1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2024-12-28 18:18:52 +00:00

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:
athile 2011-01-10 13:47:48 -07:00 committed by unknown
parent 46a8ccc2ff
commit c459eb7c55
4 changed files with 7 additions and 6 deletions

View File

@ -209,7 +209,8 @@ find_path (UUID_INCLUDE_DIR uuid/uuid.h)
include_directories(${UUID_INCLUDE_DIR})
endif (WIN32)
if (MSVC10)
set(PLATFORM_INCLUDE_DIR "")
set(PLATFORM_INCLUDE_DIR "")
add_definitions(-DMYGUI_DONT_REPLACE_NULLPTR)
endif()
# Dependencies

View File

@ -55,8 +55,8 @@ StatsWindow::StatsWindow (MWWorld::Environment& environment)
for (int i = 0; i < ESM::Skill::Length; ++i)
{
skillValues.insert(std::pair<int, MWMechanics::Stat<float> >(i, MWMechanics::Stat<float>()));
skillWidgetMap.insert(std::pair<int, MyGUI::StaticTextPtr>(i, nullptr));
skillValues.insert(std::make_pair(i, MWMechanics::Stat<float>()));
skillWidgetMap.insert(std::make_pair(i, nullptr));
}
MyGUI::WindowPtr t = static_cast<MyGUI::WindowPtr>(mMainWidget);

View File

@ -81,8 +81,8 @@ ReviewDialog::ReviewDialog(MWWorld::Environment& environment)
for (int i = 0; i < ESM::Skill::Length; ++i)
{
skillValues.insert(std::pair<int, MWMechanics::Stat<float> >(i, MWMechanics::Stat<float>()));
skillWidgetMap.insert(std::pair<int, MyGUI::StaticTextPtr>(i, nullptr));
skillValues.insert(std::make_pair(i, MWMechanics::Stat<float>()));
skillWidgetMap.insert(std::make_pair(i, nullptr));
}
static_cast<MyGUI::WindowPtr>(mMainWidget)->eventWindowChangeCoord = MyGUI::newDelegate(this, &ReviewDialog::onWindowResize);

View File

@ -6,7 +6,7 @@
// For GCC, just use strings.h (this applies to mingw too)
#if defined(__GNUC__)
# include <strings.h>
#elif defined(MSVC)
#elif defined(MSVC) || defined(_MSC_VER)
# pragma warning(disable: 4996)
# define strcasecmp stricmp
# define snprintf _snprintf