Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
bernardnormier committed Jan 22, 2025
1 parent 8363b74 commit d380328
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cpp/src/IceStorm/IceStormDB.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ run(const shared_ptr<Ice::Communicator>& communicator, const Ice::StringSeq& arg
}

string mapSizeStr = opts.optArg("mapsize");
size_t mapSize = IceDB::getMapSize(static_cast<int>(strtol(mapSizeStr.c_str(), nullptr, 10)));
size_t mapSize = IceDB::getMapSize(stoi(mapSizeStr));

try
{
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/IceStorm/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ Parser::link(const list<string>& args)

auto fromTopic = findTopic(*p++);
auto toTopic = findTopic(*p++);
auto cost = p != args.end() ? static_cast<int32_t>(strtol(p->c_str(), nullptr, 10)) : 0;
int32_t cost = p != args.end() ? stoi(*p) : 0;

fromTopic->link(toTopic, cost);
}
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/IceStorm/Service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ ServiceI::start(const string& serviceName, const CommunicatorPtr& communicator,
throw IceBox::FailureException(__FILE__, __LINE__, "IceGrid deployment is incorrect");
}

int nodeid = static_cast<int>(strtol(adapterId.substr(start, end - start).c_str(), nullptr, 10));
int nodeid = stoi(adapterId.substr(start, end - start));
Ice::Identity ident;
ident.category = instanceName;
ident.name = "node" + to_string(nodeid);
Expand Down
2 changes: 1 addition & 1 deletion cpp/src/IceStorm/Subscriber.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ Subscriber::create(const shared_ptr<Instance>& instance, const SubscriberRecord&
auto p = rec.theQoS.find("retryCount");
if (p != rec.theQoS.end())
{
retryCount = static_cast<int>(strtol(p->second.c_str(), nullptr, 10));
retryCount = stoi(p->second);
}

string reliability;
Expand Down

0 comments on commit d380328

Please sign in to comment.