if (!std::cin.fail())
{
- if(input == max + 1) throw CloseApp();
- if(min <= input && input <= max) return input;
+ if (input == max + 1)
+ {
+ throw CloseApp();
+ }
+ if (min <= input && input <= max)
+ {
+ return input;
+ }
}
std::cin.clear();
void printAttributes(const RCSResourceAttributes& attrs)
{
- for(const auto& attr : attrs)
+ for (const auto& attr : attrs)
{
std::cout << "\tkey : " << attr.key() << "\n\tvalue : "
<< attr.value().toString() << std::endl;
attrs[attrKey] = attrs[attrKey].get<int>() + diff;
}
- if(control == INCREASE)
+ if (control == INCREASE)
{
std::cout << attrKey << " increased." << std::endl;
}
{
g_currentRun = runPresenceSelection;
- while(true)
+ while (true)
{
try
{
g_currentRun();
}
- catch(const std::exception& e)
+ catch (const std::exception& e)
{
std::cout << e.what() << std::endl;
}
- catch(const CloseApp&)
+ catch (const CloseApp&)
{
break;
}
g_resource.reset();
- if(g_isPresenceStarted)
+ if (g_isPresenceStarted)
{
stopPresence();
}