C++11 compatible

This commit is contained in:
Benjamin Sergeant
2020-11-15 21:08:45 -08:00
parent 2aac0afca3
commit 23606b45c7
16 changed files with 135 additions and 42 deletions

View File

@ -11,6 +11,7 @@
#include "IXUrlParser.h"
#include "IXUserAgent.h"
#include "IXWebSocketHandshakeKeyGen.h"
#include "IXStrCaseCompare.h"
#include <algorithm>
#include <iostream>
#include <random>
@ -35,9 +36,7 @@ namespace ix
bool WebSocketHandshake::insensitiveStringCompare(const std::string& a, const std::string& b)
{
return std::equal(a.begin(), a.end(), b.begin(), b.end(), [](char a, char b) {
return tolower(a) == tolower(b);
});
return CaseInsensitiveLess::cmp(a, b);
}
std::string WebSocketHandshake::genRandomString(const int len)