Merge "aconfig: move cache_ as a memeber" into main

This commit is contained in:
Wonsik Kim
2023-11-21 17:57:39 +00:00
committed by Gerrit Code Review
3 changed files with 7 additions and 15 deletions

View File

@@ -151,12 +151,9 @@ mod tests {
#ifdef __cplusplus
#include <memory>
#include <vector>
namespace com::android::aconfig::test {
extern std::vector<int8_t> cache_;
class flag_provider_interface {
public:
virtual ~flag_provider_interface() = default;
@@ -359,6 +356,7 @@ void com_android_aconfig_test_reset_flags();
const PROD_SOURCE_FILE_EXPECTED: &str = r#"
#include "com_android_aconfig_test.h"
#include <server_configurable_flags/get_flags.h>
#include <vector>
namespace com::android::aconfig::test {
@@ -407,10 +405,10 @@ namespace com::android::aconfig::test {
return cache_[2];
}
private:
std::vector<int8_t> cache_ = std::vector<int8_t>(3, -1);
};
std::vector<int8_t> cache_ = std::vector<int8_t>(3, -1);
std::unique_ptr<flag_provider_interface> provider_ =
std::make_unique<flag_provider>();
}