Skip to content

Commit

Permalink
[core] Fixed formal problems detected by clang
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikołaj Małecki authored and maxsharabayko committed Dec 11, 2020
1 parent 0a61cb9 commit 0add6cc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion srtcore/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ class RollNumber
return right < *this;
}

bool operator=(const this_t& right) const
bool operator==(const this_t& right) const
{
return number == right.number;
}
Expand Down
6 changes: 4 additions & 2 deletions srtcore/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9668,8 +9668,10 @@ int CUDT::processData(CUnit* in_unit)
std::string s = tns1.str();
tns2 << "SRT:TsbPd:@" << s.substr(s.size()-2, 2);

ThreadName tn(tns2.str().c_str());
const char* thname = tns2.str().c_str();
const string& tn = tns2.str();

ThreadName tnkeep(tn.c_str());
const char* thname = tn.c_str();
#else
const char* thname = "SRT:TsbPd";
#endif
Expand Down

0 comments on commit 0add6cc

Please sign in to comment.