Commit ecc31056 authored by saubatn's avatar saubatn

FIXED std::make_pair to std::pair (to avoid Bug C2752 for VS2010).

git-svn-id: svn+ssh://scm.forge.imag.fr/var/lib/gforge/chroot/scmrepos/svn/camitk/trunk/camitk@1153 ec899d31-69d1-42ba-9299-647d76f65fb3
parent 1661a3f5
......@@ -92,7 +92,7 @@ main (int argc, char* argv[])
file >> s1;
while (!file.eof()){
file >> s2;
parameters.insert(std::make_pair<std::string,std::string>(s1,s2));
parameters.insert(std::pair<std::string,std::string>(s1,s2));
file >> s1;
}
cout << "Parameters read" << endl;
......
......@@ -54,9 +54,9 @@ Reference::Reference(mml::Reference reference, MonitoringManager* monitoringMana
for (mml::TimeStep::monitor_iterator it(monit.begin()); it != monit.end(); ++it) {
Monitor* m=MonitorFactory::createMonitor(&(*it),monitoringManager);
#if (_MSC_VER >= 1700) // Visual Studio 2012 and above compilers => function signature has changed, since VS2012
step->monitorsMap.insert(std::make_pair(m->getTypeName(),m));
step->monitorsMap.insert(std::pair(m->getTypeName(),m));
#else
step->monitorsMap.insert(std::make_pair<std::string,Monitor*>(m->getTypeName(),m));
step->monitorsMap.insert(std::pair<std::string,Monitor*>(m->getTypeName(),m));
#endif
}
......
......@@ -54,9 +54,9 @@ class MML_API SimulatorFactory
if (mapObjectCreator.find(id) != mapObjectCreator.end()){
return false;
}else{
mapObjectCreator.insert( std::make_pair<std::string,CreateSimulatorFunctionPointer>(id, &createTheSimulator<C> ) );
mapObjectCreator2.insert( std::make_pair<std::string,CreateSimulatorFunctionPointer2>(id, &createTheSimulator2<C> ) );
mapInteractive.insert(std::make_pair<std::string,bool>(id,isInteractive));
mapObjectCreator.insert( std::pair<std::string,CreateSimulatorFunctionPointer>(id, &createTheSimulator<C> ) );
mapObjectCreator2.insert( std::pair<std::string,CreateSimulatorFunctionPointer2>(id, &createTheSimulator2<C> ) );
mapInteractive.insert(std::pair<std::string,bool>(id,isInteractive));
if (isInteractive)
interactiveSimulators.push_back(id);
else
......
......@@ -35,7 +35,7 @@
class ProgramArg : public std::map<std::string, std::string> {
public:
ProgramArg(std::string defaults[][2], unsigned int sz) {
for(unsigned int i=0;i<sz;i++) insert(make_pair(defaults[i][0], defaults[i][1]));
for(unsigned int i=0;i<sz;i++) insert(pair(defaults[i][0], defaults[i][1]));
};
void parse(int argc, char* argv[], std::string usage, int offset = 1) {
......
......@@ -48,7 +48,7 @@ string outputBase;
class ProgramArg : public std::map<std::string, std::string> {
public:
ProgramArg(std::string defaults[][2], unsigned int sz) {
for(unsigned int i=0;i<sz;i++) insert(make_pair(defaults[i][0], defaults[i][1]));
for(unsigned int i=0;i<sz;i++) insert(pair(defaults[i][0], defaults[i][1]));
};
void parse(int argc, char* argv[], std::string usage, int offset = 1) {
......
......@@ -57,7 +57,7 @@ bool isIn(StructuralComponent *sc, Atom *a) {
class ProgramArg : public std::map<std::string, std::string> {
public:
ProgramArg(std::string defaults[][2], unsigned int sz) {
for(unsigned int i=0;i<sz;i++) insert(make_pair(defaults[i][0], defaults[i][1]));
for(unsigned int i=0;i<sz;i++) insert(pair(defaults[i][0], defaults[i][1]));
};
void parse(int argc, char* argv[], std::string usage, int offset = 1) {
......
......@@ -49,7 +49,7 @@ bool reorder;
class ProgramArg : public std::map<std::string, std::string> {
public:
ProgramArg(std::string defaults[][2], unsigned int sz) {
for(unsigned int i=0;i<sz;i++) insert(make_pair(defaults[i][0], defaults[i][1]));
for(unsigned int i=0;i<sz;i++) insert(pair(defaults[i][0], defaults[i][1]));
};
void parse(int argc, char* argv[], std::string usage, int offset = 1) {
......
......@@ -50,7 +50,7 @@ string output;
class ProgramArg : public std::map<std::string, std::string> {
public:
ProgramArg(std::string defaults[][2], unsigned int sz) {
for(unsigned int i=0;i<sz;i++) insert(make_pair(defaults[i][0], defaults[i][1]));
for(unsigned int i=0;i<sz;i++) insert(pair(defaults[i][0], defaults[i][1]));
};
void parse(int argc, char* argv[], std::string usage, int offset = 1) {
......
......@@ -63,7 +63,7 @@ class ProgramArg : public std::map<std::string, std::string> {
public:
ProgramArg (std::string defaults[][2], unsigned int sz) {
for (unsigned int i = 0;i < sz;i++)
insert (make_pair (defaults[i][0], defaults[i][1]));
insert (pair (defaults[i][0], defaults[i][1]));
};
void parse (int argc, char* argv[], std::string usage, int offset = 1) {
......
......@@ -47,7 +47,7 @@ using namespace std;
class ProgramArg : public std::map<std::string, std::string> {
public:
ProgramArg(std::string defaults[][2], unsigned int sz) {
for (unsigned int i = 0;i < sz;i++) insert(make_pair(defaults[i][0], defaults[i][1]));
for (unsigned int i = 0;i < sz;i++) insert(pair(defaults[i][0], defaults[i][1]));
};
void parse(int argc, char* argv[], std::string usage, int offset = 1) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment