Fix build under Visual Studio 2008

--HG--
branch : develop
hg/compatibility-develop
Jan Boon 6 years ago
parent 0863830734
commit 13e2da698a

@ -83,4 +83,6 @@ ENDIF()
IF(DEFINED REVISION) IF(DEFINED REVISION)
MESSAGE(STATUS "Found revision ${REVISION}") MESSAGE(STATUS "Found revision ${REVISION}")
ELSE()
SET(REVISION 0)
ENDIF() ENDIF()

@ -42,7 +42,7 @@ namespace NLGUI
class CStrictTransportSecurity class CStrictTransportSecurity
{ {
public: public:
typedef std::map<std::string, SHSTSObject> THSTSObject; typedef std::map<std::string, SHSTSObject> THSTSObjectMap;
static CStrictTransportSecurity* getInstance(); static CStrictTransportSecurity* getInstance();
static void release(); static void release();
@ -66,7 +66,7 @@ namespace NLGUI
~CStrictTransportSecurity(); ~CStrictTransportSecurity();
std::string _Filename; std::string _Filename;
THSTSObject _Domains; THSTSObjectMap _Domains;
}; };
} }

@ -6,9 +6,9 @@ SOURCE_GROUP("src" FILES ${SRC})
NL_TARGET_LIB(nelgui ${SRC} ${HEADERS}) NL_TARGET_LIB(nelgui ${SRC} ${HEADERS})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${LUA_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR} ${CURL_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR} ${LUA_INCLUDE_DIR} ${LUABIND_INCLUDE_DIR} ${CURL_INCLUDE_DIRS} ${OPENSSL_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(nelgui nelmisc nel3d ${LUA_LIBRARIES} ${LUABIND_LIBRARIES} ${CURL_LIBRARIES}) TARGET_LINK_LIBRARIES(nelgui nelmisc nel3d ${LUA_LIBRARIES} ${LUABIND_LIBRARIES} ${CURL_LIBRARIES} ${OPENSSL_LIBRARIES})
NL_DEFAULT_PROPS(nelgui "NeL, Library: NeL GUI") NL_DEFAULT_PROPS(nelgui "NeL, Library: NeL GUI")
NL_ADD_RUNTIME_FLAGS(nelgui) NL_ADD_RUNTIME_FLAGS(nelgui)

@ -87,9 +87,12 @@ namespace NLGUI {
if (domain.empty() || _Domains.empty()) if (domain.empty() || _Domains.empty())
return false; return false;
if (_Domains.count(domain) > 0) THSTSObjectMap::const_iterator itHsts;
itHsts = _Domains.find(domain);
if (itHsts != _Domains.end())
{ {
hsts = _Domains.at(domain); hsts = itHsts->second;
return true; return true;
} }
@ -99,11 +102,12 @@ namespace NLGUI {
{ {
std::string tmp; std::string tmp;
tmp = domain.substr(firstOf+1); tmp = domain.substr(firstOf+1);
if (_Domains.count(tmp)) itHsts = _Domains.find(tmp);
if (itHsts != _Domains.end())
{ {
if (_Domains.at(tmp).IncludeSubDomains) if (itHsts->second.IncludeSubDomains)
{ {
hsts = _Domains.at(tmp); hsts = itHsts->second;
return true; return true;
} }
@ -182,7 +186,7 @@ namespace NLGUI {
{ {
uint32 nbItems = _Domains.size(); uint32 nbItems = _Domains.size();
f.serial(nbItems); f.serial(nbItems);
for (THSTSObject::iterator it = _Domains.begin(); it != _Domains.end(); ++it) for (THSTSObjectMap::iterator it = _Domains.begin(); it != _Domains.end(); ++it)
{ {
std::string domain(it->first); std::string domain(it->first);
f.serial(domain); f.serial(domain);

Loading…
Cancel
Save