summaryrefslogtreecommitdiff
path: root/utils/synutils.h
diff options
context:
space:
mode:
authorWu, Ke <wuke@cs.umd.edu>2014-10-10 16:55:48 -0400
committerWu, Ke <wuke@cs.umd.edu>2014-10-10 16:55:48 -0400
commit4649248a3fa82c89c3d3782cecdcdcf5d487771b (patch)
tree9805eb1465aa011211987f642bea152609f69f97 /utils/synutils.h
parentc8341c0bf4d333e34354e3bed5c18606f64f474e (diff)
Remove using namespace std
Diffstat (limited to 'utils/synutils.h')
-rw-r--r--utils/synutils.h18
1 files changed, 7 insertions, 11 deletions
diff --git a/utils/synutils.h b/utils/synutils.h
index ef7b78b7..f611553e 100644
--- a/utils/synutils.h
+++ b/utils/synutils.h
@@ -17,21 +17,17 @@
#include <string>
#include <unordered_map>
-using namespace std;
-
typedef std::unordered_map<std::string, int> MapString2Int;
typedef std::unordered_map<std::string, float> MapString2Float;
typedef std::unordered_map<std::string, float>::iterator
MapString2FloatIterator;
-using namespace std;
-
struct SFReader {
SFReader() {}
virtual ~SFReader() {}
virtual bool fnReadNextLine(char* pszLine, int* piLength) = 0;
- virtual bool fnReadNextLine(string& strLine) = 0;
+ virtual bool fnReadNextLine(std::string& strLine) = 0;
};
struct STxtFileReader : public SFReader {
@@ -63,13 +59,13 @@ struct STxtFileReader : public SFReader {
return true;
}
- bool fnReadNextLine(string& strLine) {
+ bool fnReadNextLine(std::string& strLine) {
char* pszLine = new char[10001];
bool bOut = fnReadNextLine(pszLine, NULL);
if (bOut)
- strLine = string(pszLine);
+ strLine = std::string(pszLine);
else
- strLine = string("");
+ strLine = std::string("");
delete[] pszLine;
return bOut;
@@ -108,13 +104,13 @@ struct SGZFileReader : public SFReader {
return true;
}
- bool fnReadNextLine(string& strLine) {
+ bool fnReadNextLine(std::string& strLine) {
char* pszLine = new char[10001];
bool bOut = fnReadNextLine(pszLine, NULL);
if (bOut)
- strLine = string(pszLine);
+ strLine = std::string(pszLine);
else
- strLine = string("");
+ strLine = std::string("");
delete[] pszLine;
return bOut;