From 4649248a3fa82c89c3d3782cecdcdcf5d487771b Mon Sep 17 00:00:00 2001 From: "Wu, Ke" Date: Fri, 10 Oct 2014 16:55:48 -0400 Subject: Remove using namespace std --- utils/synutils.h | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'utils/synutils.h') 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 #include -using namespace std; - typedef std::unordered_map MapString2Int; typedef std::unordered_map MapString2Float; typedef std::unordered_map::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; -- cgit v1.2.3