Skip to content

Commit

Permalink
Replace utos with std::to_string
Browse files Browse the repository at this point in the history
This function doesn't need to exist since there is a standard way of doing it now.
  • Loading branch information
hainest committed May 3, 2024
1 parent 2e17fe3 commit 5f62cac
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dyninstAPI/src/BPatch_process.C
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ BPatch_object *BPatch_process::loadLibrary(const char *libname, bool)
break;
}
if (bpfv.size() > 1) {
std::string msg = std::string("Found ") + utos(bpfv.size()) +
std::string msg = std::string("Found ") + std::to_string(bpfv.size()) +
std::string("functions called DYNINSTloadLibrary -- not fatal but weird");
BPatch_reportError(BPatchSerious, 100, msg.c_str());
}
Expand Down
2 changes: 1 addition & 1 deletion dyninstAPI/src/freebsd.C
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ bool AddressSpace::getDyninstRTLibName() {
msg = std::string("Environment variable ") +
std::string("DYNINSTAPI_RT_LIB") +
std::string(" has not been defined for process ") +
utos(proc->getPid());
std::to_string(proc->getPid());
}
else {
msg = std::string("Environment variable ") +
Expand Down
2 changes: 1 addition & 1 deletion dyninstAPI/src/linux-x86.C
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ bool AddressSpace::getDyninstRTLibName() {
msg = std::string("Environment variable ") +
std::string("DYNINSTAPI_RT_LIB") +
std::string(" has not been defined for process ") +
utos(proc->getPid());
std::to_string(proc->getPid());
}
else {
msg = std::string("Environment variable ") +
Expand Down
4 changes: 2 additions & 2 deletions dyninstAPI/src/mapped_object.C
Original file line number Diff line number Diff line change
Expand Up @@ -840,8 +840,8 @@ const std::string mapped_object::debugString() const
{
std::string debug;
debug = std::string(fileName_.c_str()) + ":"
+ utos(codeBase_)
+ "/" + utos(imageSize());
+ std::to_string(codeBase_)
+ "/" + std::to_string(imageSize());
return debug;
}

Expand Down
4 changes: 2 additions & 2 deletions parseAPI/src/LoopAnalyzer.C
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ void LoopAnalyzer::dfsCreateLoopHierarchy(LoopTreeNode * parent,
for (unsigned int i = 0; i < loops_.size(); i++) {
// loop name is hierarchical level
std::string clevel = (level_ != "")
? level_ + "." + utos(i+1)
: utos(i+1);
? level_ + "." + std::to_string(i+1)
: std::to_string(i+1);

// add new tree nodes to parent
LoopTreeNode * child =
Expand Down

0 comments on commit 5f62cac

Please sign in to comment.