We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eb5c397 commit 05431cdCopy full SHA for 05431cd
source/gameanalytics/GAProgressionTries.cpp
@@ -0,0 +1,38 @@
1
+#pragma once
2
+
3
+#include "GameAnalytics/GAProgressionTries.h"
4
5
+namespace gameanalytics
6
+{
7
+ void ProgressionTries::setTries(std::string const& s, int tries)
8
+ {
9
+ _tries[s] = tries;
10
+ }
11
12
+ void ProgressionTries::remove(std::string const& s)
13
14
+ if (_tries.count(s))
15
16
+ _tries.erase(s);
17
18
19
20
+ int ProgressionTries::getTries(std::string const& s) const
21
22
+ return _tries.count(s) ? _tries.at(s) : 0;
23
24
25
+ int ProgressionTries::incrementTries(std::string const& s)
26
27
28
29
+ _tries[s]++;
30
31
+ else
32
33
+ _tries[s] = 1;
34
35
36
+ return _tries[s];
37
38
+}
0 commit comments