{
assert(min <= max);
- int input;
+ int input = 0;
std::cin >> input;
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
}
}
-void onCacheUpdated(const RCSResourceAttributes& attributes)
+void onCacheUpdated(const RCSResourceAttributes& attributes, int eCode)
{
- std::cout << "onCacheUpdated callback" << std::endl;
+ std::cout << "onCacheUpdated callback : " << eCode << std::endl;
printAttributes(attributes);
}
switch (processUserInput(RESOURCE_TEMP, RESOURCE_LIGHT))
{
- case RESOURCE_TEMP:
- {
- g_attrKey = "Temperature";
- return RESOURCE_TYPE_TEMP;
- }
- case RESOURCE_LIGHT:
- {
- g_attrKey = "Brightness";
- return RESOURCE_TYPE_LIGHT;
- }
+ case RESOURCE_TEMP:
+ {
+ g_attrKey = "Temperature";
+ return RESOURCE_TYPE_TEMP;
+ }
+ case RESOURCE_LIGHT:
+ {
+ g_attrKey = "Brightness";
+ return RESOURCE_TYPE_LIGHT;
+ }
}
throw std::logic_error("unreachable");