diff options
author | Igor Khmurets <subzero@mapswithme.com> | 2013-11-15 19:35:02 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:05:21 +0300 |
commit | d213429d76893daf6d0a8fb43d362c474e64699c (patch) | |
tree | 450d505010b4e4811cb14319f7dece21c0bd3918 /platform/settings.cpp | |
parent | 427f1fc8cd2f319014639c28747bbf42afd509d0 (diff) |
Added IsFirstLaunch() method to settings
Diffstat (limited to 'platform/settings.cpp')
-rw-r--r-- | platform/settings.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/platform/settings.cpp b/platform/settings.cpp index dbe52ff14f..52aafc8de9 100644 --- a/platform/settings.cpp +++ b/platform/settings.cpp @@ -17,6 +17,8 @@ #include "../std/iostream.hpp" +#define FIRST_LAUNCH_KEY "FirstLaunchOnDate" + static char const DELIM_CHAR = '='; namespace Settings @@ -317,14 +319,19 @@ namespace Settings bool IsFirstLaunchForDate(int date) { - char const * key = "FirstLaunchOnDate"; int savedDate; - if (!Get(key, savedDate) || savedDate < date) + if (!Get(FIRST_LAUNCH_KEY, savedDate) || savedDate < date) { - Set(key, date); + Set(FIRST_LAUNCH_KEY, date); return true; } else return false; } + + bool IsFirstLaunch() + { + int unused; + return !Get(FIRST_LAUNCH_KEY, unused); + } } |