JSON API service and RsThread fixups

This commit is contained in:
Gioacchino Mazzurco 2020-01-08 14:24:46 +01:00
parent f4d7fe4dde
commit f12ec2b535
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
6 changed files with 88 additions and 53 deletions

View file

@ -207,15 +207,14 @@ bool ConvertUtf16ToUtf8(const std::wstring& source, std::string& dest)
bool is_alphanumeric(char c)
{
return (c>='0' && c<'9') || (c>='a' && c<='z') || (c>='A' && c<='Z') ;
return (c>='0' && c<='9') || (c>='a' && c<='z') || (c>='A' && c<='Z');
}
bool is_alphanumeric(const std::string& s)
{
for(uint32_t i=0;i<s.size();++i)
if(!is_alphanumeric(s[i]))
return false;
return true;
for( uint32_t i=0; i < s.size(); ++i)
if(!is_alphanumeric(s[i])) return false;
return true;
}
} } // librs::util