Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 8058


Ignore:
Timestamp:
Mar 11, 2011, 3:33:35 AM (14 years ago)
Author:
rgrieder
Message:

VS 2010 doesn't like std::make_pair with C-strings if the result should actually contain std::string.

Location:
code/branches/kicklib/src/libraries/core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • code/branches/kicklib/src/libraries/core/Game.cc

    r7284 r8058  
    455455            ThrowException(GameState, "Emtpy GameState hierarchy provided, terminating.");
    456456        // Add element with large identation to detect the last with just an iterator
    457         stateStrings.push_back(std::make_pair("", -1));
     457        stateStrings.push_back(std::make_pair(std::string(), -1));
    458458
    459459        // Parse elements recursively
  • code/branches/kicklib/src/libraries/core/PathConfig.cc

    r6417 r8058  
    233233        // Create directories to avoid problems when opening files in non existent folders.
    234234        std::vector<std::pair<bf::path, std::string> > directories;
    235         directories.push_back(std::make_pair(bf::path(configPath_), "config"));
    236         directories.push_back(std::make_pair(bf::path(logPath_), "log"));
     235        directories.push_back(std::make_pair(bf::path(configPath_), std::string("config")));
     236        directories.push_back(std::make_pair(bf::path(logPath_), std::string("log")));
    237237
    238238        for (std::vector<std::pair<bf::path, std::string> >::iterator it = directories.begin();
  • code/branches/kicklib/src/libraries/core/input/InputManager.cc

    r7874 r8058  
    151151        assert(devices_.size() == InputDeviceEnumerator::FirstJoyStick);
    152152
     153        typedef std::pair<std::string, std::string> StringPair;
     154
    153155        // Fill parameter list
    154156        OIS::ParamList paramList;
    155157        size_t windowHnd = GraphicsManager::getInstance().getRenderWindowHandle();
    156         paramList.insert(std::make_pair("WINDOW", multi_cast<std::string>(windowHnd)));
     158        paramList.insert(StringPair("WINDOW", multi_cast<std::string>(windowHnd)));
    157159#if defined(ORXONOX_PLATFORM_WINDOWS)
    158         paramList.insert(std::make_pair("w32_keyboard", "DISCL_NONEXCLUSIVE"));
    159         paramList.insert(std::make_pair("w32_keyboard", "DISCL_FOREGROUND"));
    160         paramList.insert(std::make_pair("w32_mouse", "DISCL_FOREGROUND"));
     160        paramList.insert(StringPair("w32_keyboard", "DISCL_NONEXCLUSIVE"));
     161        paramList.insert(StringPair("w32_keyboard", "DISCL_FOREGROUND"));
     162        paramList.insert(StringPair("w32_mouse", "DISCL_FOREGROUND"));
    161163        if (exclusiveMouse_ == TriBool::True || GraphicsManager::getInstance().isFullScreen())
    162164        {
    163165            // Disable Windows key plus special keys (like play, stop, next, etc.)
    164             paramList.insert(std::make_pair("w32_keyboard", "DISCL_NOWINKEY"));
    165             paramList.insert(std::make_pair("w32_mouse", "DISCL_EXCLUSIVE"));
    166         }
    167         else
    168             paramList.insert(std::make_pair("w32_mouse", "DISCL_NONEXCLUSIVE"));
     166            paramList.insert(StringPair("w32_keyboard", "DISCL_NOWINKEY"));
     167            paramList.insert(StringPair("w32_mouse", "DISCL_EXCLUSIVE"));
     168        }
     169        else
     170            paramList.insert(StringPair("w32_mouse", "DISCL_NONEXCLUSIVE"));
    169171#elif defined(ORXONOX_PLATFORM_LINUX)
    170172        // Enabling this is probably a bad idea, but whenever orxonox crashes, the setting stays on
    171173        // Trouble might be that the Pressed event occurs a bit too often...
    172         paramList.insert(std::make_pair("XAutoRepeatOn", "true"));
     174        paramList.insert(StringPair("XAutoRepeatOn", "true"));
    173175
    174176        if (exclusiveMouse_ == TriBool::True || GraphicsManager::getInstance().isFullScreen())
    175177        {
    176178            if (CommandLineParser::getValue("keyboard_no_grab").getBool())
    177                 paramList.insert(std::make_pair("x11_keyboard_grab", "false"));
     179                paramList.insert(StringPair("x11_keyboard_grab", "false"));
    178180            else
    179                 paramList.insert(std::make_pair("x11_keyboard_grab", "true"));
    180             paramList.insert(std::make_pair("x11_mouse_grab",  "true"));
    181             paramList.insert(std::make_pair("x11_mouse_hide", "true"));
    182         }
    183         else
    184         {
    185             paramList.insert(std::make_pair("x11_keyboard_grab", "false"));
    186             paramList.insert(std::make_pair("x11_mouse_grab",  "false"));
    187             paramList.insert(std::make_pair("x11_mouse_hide", "false"));
     181                paramList.insert(StringPair("x11_keyboard_grab", "true"));
     182            paramList.insert(StringPair("x11_mouse_grab",  "true"));
     183            paramList.insert(StringPair("x11_mouse_hide", "true"));
     184        }
     185        else
     186        {
     187            paramList.insert(StringPair("x11_keyboard_grab", "false"));
     188            paramList.insert(StringPair("x11_mouse_grab",  "false"));
     189            paramList.insert(StringPair("x11_mouse_hide", "false"));
    188190        }
    189191#endif
Note: See TracChangeset for help on using the changeset viewer.