Fix compiler warnings, explicitly cast by default

This commit is contained in:
Lion Kortlepel
2020-11-01 12:19:19 +01:00
parent 8bc35fb82e
commit 953131289d
11 changed files with 60 additions and 55 deletions

View File

@@ -22,7 +22,7 @@ private:
std::string::size_type p;
if (Buf.at(0) == '\n'){
p = Buf.find('\n',1);
if(p != -1){
if(p != std::string::npos){
std::string R = Buf.substr(1,p-1);
std::string_view B(R.c_str(),R.find(char(0)));
GParser(c, B.data());
@@ -31,7 +31,7 @@ private:
}
}else{
p = Buf.find('\n');
if(p == -1)Buf.clear();
if(p == std::string::npos)Buf.clear();
else{
Buf = Buf.substr(p);
Manage(c);