summaryrefslogtreecommitdiff
path: root/src/dkimbase.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dkimbase.cpp')
-rw-r--r--src/dkimbase.cpp10
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());
}
//////////////////////////////////////////////////////////////////////////////////////////