Deal with tr1 being gone in c0x11 compilers
This commit is contained in:
@@ -34,8 +34,7 @@
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
#include <list>
|
||||
#include <tr1/unordered_map>
|
||||
using std::tr1::unordered_map;
|
||||
#include "unordered_defs.h"
|
||||
using namespace std;
|
||||
|
||||
#include "smallut.h"
|
||||
@@ -1157,14 +1156,14 @@ static const char *vlang_to_code[] = {
|
||||
|
||||
string langtocode(const string& lang)
|
||||
{
|
||||
static unordered_map<string, string> lang_to_code;
|
||||
static STD_UNORDERED_MAP<string, string> lang_to_code;
|
||||
if (lang_to_code.empty()) {
|
||||
for (unsigned int i = 0;
|
||||
i < sizeof(vlang_to_code) / sizeof(char *); i += 2) {
|
||||
lang_to_code[vlang_to_code[i]] = vlang_to_code[i+1];
|
||||
}
|
||||
}
|
||||
unordered_map<string,string>::const_iterator it =
|
||||
STD_UNORDERED_MAP<string,string>::const_iterator it =
|
||||
lang_to_code.find(lang);
|
||||
|
||||
// Use cp1252 by default...
|
||||
|
||||
@@ -22,10 +22,7 @@
|
||||
|
||||
#include <string>
|
||||
#include <queue>
|
||||
#include <tr1/unordered_map>
|
||||
#include <tr1/unordered_set>
|
||||
using std::tr1::unordered_map;
|
||||
using std::tr1::unordered_set;
|
||||
#include "unordered_defs.h"
|
||||
using std::queue;
|
||||
using std::string;
|
||||
|
||||
@@ -216,7 +213,7 @@ public:
|
||||
// Perform the thread joins and compute overall status
|
||||
// Workers return (void*)1 if ok
|
||||
void *statusall = (void*)1;
|
||||
unordered_map<pthread_t, WQTData>::iterator it;
|
||||
STD_UNORDERED_MAP<pthread_t, WQTData>::iterator it;
|
||||
while (!m_worker_threads.empty()) {
|
||||
void *status;
|
||||
it = m_worker_threads.begin();
|
||||
@@ -333,7 +330,7 @@ private:
|
||||
|
||||
// Per-thread data. The data is not used currently, this could be
|
||||
// a set<pthread_t>
|
||||
unordered_map<pthread_t, WQTData> m_worker_threads;
|
||||
STD_UNORDERED_MAP<pthread_t, WQTData> m_worker_threads;
|
||||
|
||||
// Synchronization
|
||||
queue<T> m_queue;
|
||||
|
||||
Reference in New Issue
Block a user