]> git.stg.codes - stg.git/blob - projects/stargazer/plugins/other/smux/sensors.cpp
Replace some unsigned types with size_t
[stg.git] / projects / stargazer / plugins / other / smux / sensors.cpp
1 #include "stg/INTEGER.h"
2
3 #include "stg/user.h"
4
5 #include "sensors.h"
6
7 bool UsersSensor::GetValue(ObjectSyntax_t * objectSyntax) const
8 {
9 int handle = users.OpenSearch();
10 if (!handle)
11     return false;
12
13 USER_PTR user;
14 size_t count = 0;
15 while (!users.SearchNext(handle, &user))
16     {
17     if (UserPredicate(user))
18         ++count;
19     }
20
21 users.CloseSearch(handle);
22
23 ValueToOS(count, objectSyntax);
24 return true;
25 }