1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 21:23:52 +00:00

std::map to std::multimap

This commit is contained in:
Sebastian Wick 2012-03-31 18:28:48 +02:00
parent 653fbdd10c
commit 092de45924
3 changed files with 5 additions and 5 deletions

View file

@ -26,7 +26,7 @@ strmap MwIniImporter::loadIniFile(std::string filename) {
std::cout << "load ini file: " << filename << std::endl; std::cout << "load ini file: " << filename << std::endl;
std::string section(""); std::string section("");
std::map<std::string, std::string> map; std::multimap<std::string, std::string> map;
boost::iostreams::stream<boost::iostreams::file_source>file(filename.c_str()); boost::iostreams::stream<boost::iostreams::file_source>file(filename.c_str());
std::string line; std::string line;
@ -58,7 +58,7 @@ strmap MwIniImporter::loadIniFile(std::string filename) {
strmap MwIniImporter::loadCfgFile(std::string filename) { strmap MwIniImporter::loadCfgFile(std::string filename) {
std::cout << "load cfg file: " << filename << std::endl; std::cout << "load cfg file: " << filename << std::endl;
std::map<std::string, std::string> map; std::multimap<std::string, std::string> map;
boost::iostreams::stream<boost::iostreams::file_source>file(filename.c_str()); boost::iostreams::stream<boost::iostreams::file_source>file(filename.c_str());
std::string line; std::string line;

View file

@ -6,7 +6,7 @@
#include <exception> #include <exception>
typedef std::map<std::string, std::string> strmap; typedef std::multimap<std::string, std::string> strmap;
class MwIniImporter { class MwIniImporter {

View file

@ -62,8 +62,8 @@ int main(int argc, char *argv[]) {
MwIniImporter importer; MwIniImporter importer;
importer.setVerbose(vm.count("verbose")); importer.setVerbose(vm.count("verbose"));
std::map<std::string, std::string>ini = importer.loadIniFile(iniFile); std::multimap<std::string, std::string>ini = importer.loadIniFile(iniFile);
std::map<std::string, std::string>cfg = importer.loadCfgFile(cfgFile); std::multimap<std::string, std::string>cfg = importer.loadCfgFile(cfgFile);
importer.merge(cfg, ini); importer.merge(cfg, ini);