]> git.stg.codes - stg.git/blobdiff - projects/stargazer/plugins/other/smux/tables.cpp
Added assignment operator for SGCONF::OPTION.
[stg.git] / projects / stargazer / plugins / other / smux / tables.cpp
index ad08c40f02acd03794aefa2b996d1ea6729ab2cd..c3e3ef54c48d870fee774d16ac11e3420b8b67e2 100644 (file)
@@ -31,8 +31,7 @@ while (!users.SearchNext(handle, &user))
     if (user->GetDeleted())
         continue;
     std::string tariffName(user->GetProperty().tariffName.ConstData());
     if (user->GetDeleted())
         continue;
     std::string tariffName(user->GetProperty().tariffName.ConstData());
-    std::map<std::string, size_t>::iterator it;
-    it = data.lower_bound(tariffName);
+    std::map<std::string, size_t>::iterator it(data.lower_bound(tariffName));
     if (it == data.end() ||
         it->first != tariffName)
         {
     if (it == data.end() ||
         it->first != tariffName)
         {
@@ -52,8 +51,8 @@ OID prefixOid(prefix);
 std::map<std::string, size_t>::const_iterator it(data.begin());
 while (it != data.end())
     {
 std::map<std::string, size_t>::const_iterator it(data.begin());
 while (it != data.end())
     {
-    sensors[prefixOid.copyWithSuffix(2, idx)] = new ConstSensor<std::string>(it->first);
-    sensors[prefixOid.copyWithSuffix(3, idx)] = new ConstSensor<int>(it->second);
+    sensors[prefixOid.copyWithSuffix(2, static_cast<unsigned int>(idx))] = new ConstSensor<std::string>(it->first);
+    sensors[prefixOid.copyWithSuffix(3, static_cast<unsigned int>(idx))] = new ConstSensor<unsigned long>(it->second);
     ++idx;
     ++it;
     }
     ++idx;
     ++it;
     }