std::map to std::multimap

actorid
Sebastian Wick 13 years ago
parent 653fbdd10c
commit 092de45924

@ -26,7 +26,7 @@ strmap MwIniImporter::loadIniFile(std::string filename) {
std::cout << "load ini file: " << filename << std::endl;
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());
std::string line;
@ -58,7 +58,7 @@ strmap MwIniImporter::loadIniFile(std::string filename) {
strmap MwIniImporter::loadCfgFile(std::string filename) {
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());
std::string line;

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

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

Loading…
Cancel
Save