val=arg.substr(pos+2);
incremental = true;
}
- else if(arg.find("--") == 0 && (pos=arg.find("="))!=string::npos) // this is a --port=25 case
+ else if(arg.find("--") == 0 && (pos=arg.find('='))!=string::npos) // this is a --port=25 case
{
var=arg.substr(2,pos-2);
val=arg.substr(pos+1);
}
- else if(arg.find("--") == 0 && (arg.find("=")==string::npos)) // this is a --daemon case
+ else if(arg.find("--") == 0 && (arg.find('=')==string::npos)) // this is a --daemon case
{
var=arg.substr(2);
val="";
line+=pline;
// strip everything after a #
- if((pos=line.find("#"))!=string::npos) {
+ if((pos=line.find('#'))!=string::npos) {
// make sure it's either first char or has whitespace before
// fixes issue #354
if (pos == 0 || std::isspace(line[pos-1]))
string& attodot(string &str)
{
- if(str.find_first_of("@")==string::npos)
+ if(str.find_first_of('@')==string::npos)
return str;
for (unsigned int i = 0; i < str.length(); i++)
{
bool res;
- if(module.find(".")==string::npos)
+ if(module.find('.')==string::npos)
res=UeberBackend::loadmodule(arg()["module-dir"]+"/lib"+module+"backend.so");
else if(module[0]=='/' || (module[0]=='.' && module[1]=='/') || (module[0]=='.' && module[1]=='.')) // absolute or current path
res=UeberBackend::loadmodule(module);
record = element;
}
- if (record.find("/") == string::npos) { // Required by RFC section 5
+ if (record.find('/') == string::npos) { // Required by RFC section 5
throw MOADNSException("Asked to decode '"+element+"' as an APL record, but missing subnet mask");
}
{
for (const auto& module: modules) {
bool res;
- if (module.find(".")==string::npos) {
+ if (module.find('.')==string::npos) {
res = UeberBackend::loadmodule(path+"/lib"+module+"backend.so");
} else if (module[0]=='/' || (module[0]=='.' && module[1]=='/') || (module[0]=='.' && module[1]=='.')) {
// absolute or current path