Corrected type of json array value index

Former-commit-id: f766365fc3be4d1b62c36ce05e8a6d818f73dede
This commit is contained in:
ntim 2015-03-07 09:58:48 +01:00
parent 7292922309
commit f83802f2b1

View File

@ -197,7 +197,7 @@ LedDevice * LedDeviceFactory::construct(const Json::Value & deviceConfig)
const bool switchOffOnBlack = deviceConfig.get("switchOffOnBlack", true).asBool();
const int transitiontime = deviceConfig.get("transitiontime", 1).asInt();
std::vector<unsigned int> lightIds;
for (size_t i = 0; i < deviceConfig["lightIds"].size(); i++) {
for (Json::Value::ArrayIndex i = 0; i < deviceConfig["lightIds"].size(); i++) {
lightIds.push_back(deviceConfig["lightIds"][i].asInt());
}
device = new LedDevicePhilipsHue(output, username, switchOffOnBlack, transitiontime, lightIds);