From ec3083827d68ea27c8c888809d15993ec515eda9 Mon Sep 17 00:00:00 2001 From: Flakebi Date: Wed, 29 Jul 2015 23:02:16 +0200 Subject: [PATCH] Add some documenation and try to get some backwards compatibility --- data/kart_characteristics.xml | 28 +++++++++++++++++++++------ src/karts/kart_properties_manager.cpp | 15 ++++++++------ 2 files changed, 31 insertions(+), 12 deletions(-) diff --git a/data/kart_characteristics.xml b/data/kart_characteristics.xml index 8134fbc13..adfead682 100644 --- a/data/kart_characteristics.xml +++ b/data/kart_characteristics.xml @@ -1,6 +1,19 @@ @@ -317,6 +331,8 @@ + diff --git a/src/karts/kart_properties_manager.cpp b/src/karts/kart_properties_manager.cpp index 4794c410c..9e7ca250d 100644 --- a/src/karts/kart_properties_manager.cpp +++ b/src/karts/kart_properties_manager.cpp @@ -207,8 +207,9 @@ void KartPropertiesManager::loadCharacteristics(const XMLNode *root) type != nodes.cend(); type++) { (*type)->get("name", &name); - m_difficulty_characteristics.emplace(name, - std::unique_ptr(new XmlCharacteristic(*type))); + m_difficulty_characteristics.insert(std::pair >(name, + std::unique_ptr(new XmlCharacteristic(*type)))); } // Load kart type characteristics nodes.clear(); @@ -217,8 +218,9 @@ void KartPropertiesManager::loadCharacteristics(const XMLNode *root) type != nodes.cend(); type++) { (*type)->get("name", &name); - m_kart_type_characteristics.emplace(name, - std::unique_ptr(new XmlCharacteristic(*type))); + m_kart_type_characteristics.insert(std::pair >(name, + std::unique_ptr(new XmlCharacteristic(*type)))); } // Load player difficulties nodes.clear(); @@ -227,8 +229,9 @@ void KartPropertiesManager::loadCharacteristics(const XMLNode *root) type != nodes.cend(); type++) { (*type)->get("name", &name); - m_player_characteristics.emplace(name, - std::unique_ptr(new XmlCharacteristic(*type))); + m_player_characteristics.insert(std::pair >(name, + std::unique_ptr(new XmlCharacteristic(*type)))); } }