Skip to content

Commit b177301

Browse files
committed
rename remote configs members
1 parent d76234d commit b177301

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

source/gameanalytics/GAState.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ namespace gameanalytics
411411
out["user_id"] = getUserId();
412412

413413
// remote configs configurations
414-
if(getInstance()._configurations.is_object() && !getInstance()._configurations.empty())
414+
if(getInstance()._gameRemoteConfigsJson.is_object() && !getInstance()._gameRemoteConfigsJson.empty())
415415
{
416416
out["configurations_v3"] = getInstance().getRemoteConfigAnnotations();
417417
}
@@ -895,7 +895,7 @@ namespace gameanalytics
895895

896896
json contents;
897897

898-
for(auto& obj : getInstance()._configurations)
898+
for(auto& obj : getInstance()._gameRemoteConfigsJson)
899899
{
900900
if(obj.contains("key") && obj.contains("value"))
901901
{
@@ -913,7 +913,7 @@ namespace gameanalytics
913913
void GAState::populateConfigurations(json& sdkConfig)
914914
{
915915
std::lock_guard<std::recursive_mutex> guard(_mtx);
916-
_configurations = {};
916+
_gameRemoteConfigsJson = {};
917917

918918
try
919919
{
@@ -933,7 +933,7 @@ namespace gameanalytics
933933

934934
if (!key.empty() && configuration.contains("value") && client_ts_adjusted > start_ts && client_ts_adjusted < end_ts)
935935
{
936-
_configurations[key] = configuration;
936+
_gameRemoteConfigsJson[key] = configuration;
937937
logging::GALogger::d("configuration added: %s", configuration.dump(JSON_PRINT_INDENT).c_str());
938938
}
939939
}
@@ -942,7 +942,7 @@ namespace gameanalytics
942942

943943
_remoteConfigsIsReady = true;
944944

945-
std::string const configStr = _configurations.dump();
945+
std::string const configStr = _gameRemoteConfigsJson.dump();
946946
for (auto& listener : _remoteConfigsListeners)
947947
{
948948
listener->onRemoteConfigsUpdated(configStr);
@@ -1161,7 +1161,7 @@ namespace gameanalytics
11611161
json GAState::getRemoteConfigAnnotations()
11621162
{
11631163
json configs;
1164-
for(json& obj : _configurations)
1164+
for(json& obj : _gameRemoteConfigsJson)
11651165
{
11661166
json cfg;
11671167
cfg["vsn"] = utilities::getOptionalValue<int>(obj, "vsn", 0);

source/gameanalytics/GAState.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -150,9 +150,9 @@ namespace gameanalytics
150150
inline static T getRemoteConfigsValue(std::string const& key, T const& defaultValue)
151151
{
152152
std::lock_guard<std::recursive_mutex> lg(getInstance()._mtx);
153-
if(getInstance()._configurations.contains(key))
153+
if(getInstance()._gameRemoteConfigsJson.contains(key))
154154
{
155-
json& config = getInstance()._configurations[key];
155+
json& config = getInstance()._gameRemoteConfigsJson[key];
156156
T value = utilities::getOptionalValue<T>(config, "value", defaultValue);
157157
return value;
158158
}
@@ -271,7 +271,9 @@ namespace gameanalytics
271271

272272
bool _enableIdTracking = true;
273273

274-
json _configurations;
274+
json _gameRemoteConfigsJson;
275+
json _trackingRemoteConfigsJson;
276+
275277
bool _remoteConfigsIsReady;
276278
std::vector<std::shared_ptr<IRemoteConfigsListener>> _remoteConfigsListeners;
277279
std::recursive_mutex _mtx;

0 commit comments

Comments
 (0)