mirror of
https://github.com/znc/znc.git
synced 2026-05-10 07:14:43 +02:00
Remove some code duplications and move functions into classes
This removes ReadFile(), WriteFile(), ReadLine(), Lower() and Upper() from Utils.h and adds CFile::ReadFile(). The biggest part of this patch fixes modules to use CFile and CString instead of these global functions. git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@1311 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
+7
-4
@@ -169,10 +169,13 @@ public:
|
||||
{
|
||||
EmailST tmp;
|
||||
tmp.sUidl = (char *)CMD5(m_sMailBuffer.substr(0, 255));
|
||||
CString sLine;
|
||||
CString::size_type iPos = 0;
|
||||
while (::ReadLine(m_sMailBuffer, sLine, iPos))
|
||||
{
|
||||
VCString vsLines;
|
||||
VCString::iterator it;
|
||||
|
||||
m_sMailBuffer.Split("\n", vsLines);
|
||||
|
||||
for (it = vsLines.begin(); it != vsLines.end(); it++) {
|
||||
CString sLine(*it);
|
||||
sLine.Trim();
|
||||
if (sLine.empty())
|
||||
break; // out of the headers
|
||||
|
||||
Reference in New Issue
Block a user