diff options
author | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 23:33:05 +0200 |
---|---|---|
committer | Jannis Hoffmann <jannis@fehcom.de> | 2024-07-03 23:33:05 +0200 |
commit | cb9bff92107d168ff6dd0c12dc34bc7bacc8eb7d (patch) | |
tree | 189cf862c6f0b5ca7151c91642ae8d00b0ae9f4a /src/dkimbase.cpp | |
parent | 4ff4d753e04dc044cbe5a7a581d9a47a7ad488b2 (diff) |
remove "using namespace std" from cpp headers
Diffstat (limited to 'src/dkimbase.cpp')
-rw-r--r-- | src/dkimbase.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/dkimbase.cpp b/src/dkimbase.cpp index 0361d8e..5ee6f28 100644 --- a/src/dkimbase.cpp +++ b/src/dkimbase.cpp @@ -27,6 +27,8 @@ #include "dkim.h" +using std::string; + CDKIMBase::CDKIMBase() : m_From(nullptr), @@ -98,7 +100,7 @@ int CDKIMBase::ReAlloc(char *& szBuffer, int& nBufferSize, int nRequiredSize) //////////////////////////////////////////////////////////////////////////////// void CDKIMBase::Free(char *szBuffer) { - if (szBuffer) delete[] szBuffer; + delete[] szBuffer; } //////////////////////////////////////////////////////////////////////////////// @@ -214,17 +216,17 @@ struct isswsp { void CDKIMBase::RemoveSWSP(char *szBuffer) { - *remove_if(szBuffer, szBuffer + strlen(szBuffer), isswsp()) = '\0'; + *std::remove_if(szBuffer, szBuffer + strlen(szBuffer), isswsp()) = '\0'; } void CDKIMBase::RemoveSWSP(char *pBuffer, int& nBufLength) { - nBufLength = remove_if(pBuffer, pBuffer + nBufLength, isswsp()) - pBuffer; + nBufLength = std::remove_if(pBuffer, pBuffer + nBufLength, isswsp()) - pBuffer; } void CDKIMBase::RemoveSWSP(string& sBuffer) { - sBuffer.erase(remove_if(sBuffer.begin(), sBuffer.end(), isswsp()), sBuffer.end()); + sBuffer.erase(std::remove_if(sBuffer.begin(), sBuffer.end(), isswsp()), sBuffer.end()); } ////////////////////////////////////////////////////////////////////////////////////////// |