21
21
BOOL active;
22
22
char * start;
23
23
char * end;
24
- BOOL hasTotalUsers;
25
24
int totalUsers;
26
25
int status;
27
26
char * formattedScore;
42
41
char * metadata;
43
42
char * start;
44
43
char * end;
45
- BOOL hasTotalUsers;
46
44
int totalUsers;
47
45
int status;
48
46
char * formattedScore;
56
54
{
57
55
char * identifier;
58
56
char * title;
57
+ char * metadata;
59
58
char * formattedScore;
60
59
BOOL hasScore;
61
60
double score;
62
- BOOL hasRank;
63
- int rank;
64
61
BOOL hasPercentile;
65
- float percentile;
62
+ int percentile;
66
63
} ZPCUStatistic;
67
64
68
65
typedef struct
@@ -136,7 +133,6 @@ ZPCUCompetition toUnityCompetition(ZPCCompetition *c){
136
133
competition.active = c.active ;
137
134
competition.start = toCString ([ZPCUtils toIsoDate: c.start]);
138
135
competition.end = toCString ([ZPCUtils toIsoDate: c.end]);
139
- competition.hasTotalUsers = hasValue (c.totalUsers );
140
136
competition.totalUsers = [c.totalUsers intValue ];
141
137
competition.status = (int )c.status ;
142
138
competition.formattedScore = toCString (c.formattedScore );
@@ -158,7 +154,6 @@ ZPCUChallenge toUnityChallenge(ZPCChallenge *c){
158
154
challenge.active = c.active ;
159
155
challenge.start = toCString ([ZPCUtils toIsoDate: c.start]);
160
156
challenge.end =toCString ([ZPCUtils toIsoDate: c.end]);
161
- challenge.hasTotalUsers = hasValue (c.totalUsers );
162
157
challenge.totalUsers = [c.totalUsers intValue ];
163
158
challenge.status = (int )c.status ;
164
159
challenge.formattedScore = toCString (c.formattedScore );
@@ -173,11 +168,10 @@ ZPCUStatistic toUnityStatistic(ZPCStatistic *c){
173
168
ZPCUStatistic statistic;
174
169
statistic.identifier = toCString (c.identifier );
175
170
statistic.title =toCString (c.title );
171
+ statistic.metadata = toCString (c.metadata );
176
172
statistic.formattedScore =toCString (c.formattedScore );
177
173
statistic.hasScore = hasValue (c.score );
178
174
statistic.score = [c.score doubleValue ];
179
- statistic.hasRank = hasValue (c.rank );
180
- statistic.rank = [c.rank intValue ];
181
175
statistic.hasPercentile = hasValue (c.percentile );
182
176
statistic.percentile = [c.percentile floatValue ];
183
177
return statistic;
0 commit comments