forked from mirror/openmw-tes3mp
Visual Studio 2010 build fixes. Don't let MyGUI redefine the C++0x keyword nullptr and use _MSC_VER to check if Visual Studio is being used. MSVER is not necessarily defined on VS2010.
This commit is contained in:
parent
46a8ccc2ff
commit
c459eb7c55
4 changed files with 7 additions and 6 deletions
|
@ -209,7 +209,8 @@ find_path (UUID_INCLUDE_DIR uuid/uuid.h)
|
||||||
include_directories(${UUID_INCLUDE_DIR})
|
include_directories(${UUID_INCLUDE_DIR})
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
if (MSVC10)
|
if (MSVC10)
|
||||||
set(PLATFORM_INCLUDE_DIR "")
|
set(PLATFORM_INCLUDE_DIR "")
|
||||||
|
add_definitions(-DMYGUI_DONT_REPLACE_NULLPTR)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
|
|
@ -55,8 +55,8 @@ StatsWindow::StatsWindow (MWWorld::Environment& environment)
|
||||||
|
|
||||||
for (int i = 0; i < ESM::Skill::Length; ++i)
|
for (int i = 0; i < ESM::Skill::Length; ++i)
|
||||||
{
|
{
|
||||||
skillValues.insert(std::pair<int, MWMechanics::Stat<float> >(i, MWMechanics::Stat<float>()));
|
skillValues.insert(std::make_pair(i, MWMechanics::Stat<float>()));
|
||||||
skillWidgetMap.insert(std::pair<int, MyGUI::StaticTextPtr>(i, nullptr));
|
skillWidgetMap.insert(std::make_pair(i, nullptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
MyGUI::WindowPtr t = static_cast<MyGUI::WindowPtr>(mMainWidget);
|
MyGUI::WindowPtr t = static_cast<MyGUI::WindowPtr>(mMainWidget);
|
||||||
|
|
|
@ -81,8 +81,8 @@ ReviewDialog::ReviewDialog(MWWorld::Environment& environment)
|
||||||
|
|
||||||
for (int i = 0; i < ESM::Skill::Length; ++i)
|
for (int i = 0; i < ESM::Skill::Length; ++i)
|
||||||
{
|
{
|
||||||
skillValues.insert(std::pair<int, MWMechanics::Stat<float> >(i, MWMechanics::Stat<float>()));
|
skillValues.insert(std::make_pair(i, MWMechanics::Stat<float>()));
|
||||||
skillWidgetMap.insert(std::pair<int, MyGUI::StaticTextPtr>(i, nullptr));
|
skillWidgetMap.insert(std::make_pair(i, nullptr));
|
||||||
}
|
}
|
||||||
|
|
||||||
static_cast<MyGUI::WindowPtr>(mMainWidget)->eventWindowChangeCoord = MyGUI::newDelegate(this, &ReviewDialog::onWindowResize);
|
static_cast<MyGUI::WindowPtr>(mMainWidget)->eventWindowChangeCoord = MyGUI::newDelegate(this, &ReviewDialog::onWindowResize);
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
// For GCC, just use strings.h (this applies to mingw too)
|
// For GCC, just use strings.h (this applies to mingw too)
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
# include <strings.h>
|
# include <strings.h>
|
||||||
#elif defined(MSVC)
|
#elif defined(MSVC) || defined(_MSC_VER)
|
||||||
# pragma warning(disable: 4996)
|
# pragma warning(disable: 4996)
|
||||||
# define strcasecmp stricmp
|
# define strcasecmp stricmp
|
||||||
# define snprintf _snprintf
|
# define snprintf _snprintf
|
||||||
|
|
Loading…
Reference in a new issue