Changed include guards in utility.hpp
This commit is contained in:
parent
b89f5635a5
commit
e824aba871
1 changed files with 4 additions and 7 deletions
11
utility.hpp
11
utility.hpp
|
|
@ -1,5 +1,5 @@
|
||||||
#ifndef SIMPLE_WEB_SERVER_UTILITY_HPP
|
#ifndef SIMPLE_WEB_UTILITY_HPP
|
||||||
#define SIMPLE_WEB_SERVER_UTILITY_HPP
|
#define SIMPLE_WEB_UTILITY_HPP
|
||||||
|
|
||||||
#include "status_code.hpp"
|
#include "status_code.hpp"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
@ -8,8 +8,6 @@
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
namespace SimpleWeb {
|
namespace SimpleWeb {
|
||||||
#ifndef CASE_INSENSITIVE_EQUAL_AND_HASH
|
|
||||||
#define CASE_INSENSITIVE_EQUAL_AND_HASH
|
|
||||||
inline bool case_insensitive_equal(const std::string &str1, const std::string &str2) {
|
inline bool case_insensitive_equal(const std::string &str1, const std::string &str2) {
|
||||||
return str1.size() == str2.size() &&
|
return str1.size() == str2.size() &&
|
||||||
std::equal(str1.begin(), str1.end(), str2.begin(), [](char a, char b) {
|
std::equal(str1.begin(), str1.end(), str2.begin(), [](char a, char b) {
|
||||||
|
|
@ -33,7 +31,6 @@ namespace SimpleWeb {
|
||||||
return h;
|
return h;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
#endif
|
|
||||||
|
|
||||||
typedef std::unordered_multimap<std::string, std::string, CaseInsensitiveHash, CaseInsensitiveEqual> CaseInsensitiveMultimap;
|
typedef std::unordered_multimap<std::string, std::string, CaseInsensitiveHash, CaseInsensitiveEqual> CaseInsensitiveMultimap;
|
||||||
|
|
||||||
|
|
@ -235,7 +232,7 @@ namespace SimpleWeb {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
} // namespace SimpleWeb
|
||||||
|
|
||||||
#ifdef PTHREAD_RWLOCK_INITIALIZER
|
#ifdef PTHREAD_RWLOCK_INITIALIZER
|
||||||
namespace SimpleWeb {
|
namespace SimpleWeb {
|
||||||
|
|
@ -363,4 +360,4 @@ namespace SimpleWeb {
|
||||||
} // namespace SimpleWeb
|
} // namespace SimpleWeb
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // SIMPLE_WEB_SERVER_UTILITY_HPP
|
#endif // SIMPLE_WEB_UTILITY_HPP
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue