Merge with develop

--HG--
branch : compatibility-develop
hg/compatibility-develop
kervala 7 years ago
commit afceebb641

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

@ -209,8 +209,8 @@ MACRO(PCH_SET_COMPILE_FLAGS _target)
ENDIF()
ENDIF()
IF(USE_CPP0X AND gcc_compiler_version GREATER "6.2.0")
LIST(APPEND _FLAGS "-std=gnu++11")
IF(CMAKE_CXX11_EXTENSION_COMPILE_OPTION)
LIST(APPEND _FLAGS ${CMAKE_CXX11_EXTENSION_COMPILE_OPTION})
ENDIF()
# Format definitions

@ -238,6 +238,7 @@ MACRO(NL_SETUP_DEFAULT_OPTIONS)
OPTION(WITH_EXTERNAL "With provided external." OFF)
ENDIF()
OPTION(WITH_STATIC_EXTERNAL "With static external libraries" OFF)
OPTION(WITH_STATIC_RUNTIMES "Use only static C++ runtimes" OFF)
IF(UNIX AND NOT APPLE)
OPTION(WITH_UNIX_STRUCTURE "Use UNIX structure (bin, include, lib)" ON )
ELSE()
@ -636,8 +637,14 @@ MACRO(NL_SETUP_BUILD)
SET(NL_RELEASE_LINKFLAGS "/RELEASE ${NL_RELEASE_LINKFLAGS}")
ENDIF()
SET(NL_DEBUG_CFLAGS "/Zi /MDd /RTC1 /D_DEBUG ${DEBUG_CFLAGS} ${NL_DEBUG_CFLAGS}")
SET(NL_RELEASE_CFLAGS "/MD /DNDEBUG ${RELEASE_CFLAGS} ${NL_RELEASE_CFLAGS}")
IF(WITH_STATIC_RUNTIMES)
SET(RUNTIME_FLAG "/MT")
ELSE()
SET(RUNTIME_FLAG "/MD")
ENDIF()
SET(NL_DEBUG_CFLAGS "/Zi ${RUNTIME_FLAG}d /RTC1 /D_DEBUG ${DEBUG_CFLAGS} ${NL_DEBUG_CFLAGS}")
SET(NL_RELEASE_CFLAGS "${RUNTIME_FLAG} /DNDEBUG ${RELEASE_CFLAGS} ${NL_RELEASE_CFLAGS}")
SET(NL_DEBUG_LINKFLAGS "/DEBUG /OPT:NOREF /OPT:NOICF /NODEFAULTLIB:msvcrt ${MSVC_INCREMENTAL_YES_FLAG} ${NL_DEBUG_LINKFLAGS}")
SET(NL_RELEASE_LINKFLAGS "/OPT:REF /OPT:ICF /INCREMENTAL:NO ${NL_RELEASE_LINKFLAGS}")
@ -874,7 +881,9 @@ MACRO(NL_SETUP_BUILD)
ENDIF()
# use c++0x standard to use std::unique_ptr and std::shared_ptr
SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} -std=c++0x")
IF(CMAKE_CXX11_EXTENSION_COMPILE_OPTION)
SET(PLATFORM_CXXFLAGS "${PLATFORM_CXXFLAGS} ${CMAKE_CXX11_EXTENSION_COMPILE_OPTION}")
ENDIF()
ADD_PLATFORM_FLAGS("-D_REENTRANT")
@ -965,6 +974,10 @@ MACRO(NL_SETUP_BUILD)
IF(NOT APPLE)
ADD_PLATFORM_LINKFLAGS("-Wl,--no-undefined -Wl,--as-needed")
IF(WITH_STATIC_RUNTIMES)
ADD_PLATFORM_LINKFLAGS("-static-libstdc++")
ENDIF()
ENDIF()
IF(NOT APPLE)

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

@ -6,9 +6,9 @@ SOURCE_GROUP("src" FILES ${SRC})
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_ADD_RUNTIME_FLAGS(nelgui)

@ -87,9 +87,12 @@ namespace NLGUI {
if (domain.empty() || _Domains.empty())
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;
}
@ -99,11 +102,12 @@ namespace NLGUI {
{
std::string tmp;
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;
}
@ -182,7 +186,7 @@ namespace NLGUI {
{
uint32 nbItems = _Domains.size();
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);
f.serial(domain);

@ -57,6 +57,9 @@ ScreenFull = 1;
// Start position of the player (the z is always 0)
StartPoint = { 1840.0, -970.0, 0.0 };
// Anti-Aliasing
EnableFXAA = 0;
//////////////////////////////////////////////////////////////////////////////
// HMD Variables /////////////////////////////////////////////////////////////

@ -37,7 +37,15 @@ namespace SBCLIENT {
void CConfiguration::setAndCallback(const std::string &varName, void (*cb)(CConfigFile::CVar &var))
{
ConfigFile->setCallback(varName, cb);
cb(*ConfigFile->getVarPtr(varName));
CConfigFile::CVar *varPtr = ConfigFile->getVarPtr(varName);
if (!varPtr)
{
nlwarning("Missing config variable '%s'", varName.c_str());
}
else
{
cb(*varPtr);
}
}
void CConfiguration::dropCallback(const std::string &varName)

Loading…
Cancel
Save