Revision: 7238
http://svn.sourceforge.net/mahogany/?rev=7238&view=rev
Author: vadz
Date: 2007-04-23 13:29:44 -0700 (Mon, 23 Apr 2007)
Log Message:
-----------
fixed code relying on implicit wxString to bool conversion (this never worked correctly, now it doesn't even compile)
Modified Paths:
--------------
trunk/M/src/adb/AdbDialogs.cpp
trunk/M/src/adb/ExportPalm.cpp
trunk/M/src/gui/wxMDialogs.cpp
trunk/M/src/modules/Filters.cpp
Modified: trunk/M/src/adb/AdbDialogs.cpp
===================================================================
--- trunk/M/src/adb/AdbDialogs.cpp 2007-04-23 20:24:28 UTC (rev 7237)
+++ trunk/M/src/adb/AdbDialogs.cpp 2007-04-23 20:29:44 UTC (rev 7238)
@@ -626,10 +626,8 @@
return FALSE;
}
- if ( *nameOfNativeAdb )
- {
+ if ( nameOfNativeAdb )
*nameOfNativeAdb = adbname;
- }
// do import
bool ok = AdbImport(filename, adbname, wxEmptyString, importer);
Modified: trunk/M/src/adb/ExportPalm.cpp
===================================================================
--- trunk/M/src/adb/ExportPalm.cpp 2007-04-23 20:24:28 UTC (rev 7237)
+++ trunk/M/src/adb/ExportPalm.cpp 2007-04-23 20:29:44 UTC (rev 7238)
@@ -191,7 +191,7 @@
}
entry.GetField(AdbField_Prefix, &val);
entry.GetField(AdbField_Title, &tmp);
- if(tmp.Length()) val << ' ' << tmp;
+ if(!tmp.empty()) val << ' ' << tmp;
s << '"' << EscapeQuotes(val) << _T("\",");
ADD(AdbField_Organization);
@@ -209,7 +209,7 @@
if(val.Length())
{
entry.GetField(AdbField_H_StreetNo, &tmp);
- if(tmp) val << ' ' << tmp;
+ if(!tmp.empty()) val << ' ' << tmp;
if(! val) entry.GetField(AdbField_H_POBox, &val);
s << '"' << val << _T("\",");
}
@@ -224,7 +224,7 @@
if(val.Length())
{
entry.GetField(AdbField_O_StreetNo, &tmp);
- if(tmp) val << ' ' << tmp;
+ if(!tmp.empty()) val << ' ' << tmp;
if(! val) entry.GetField(AdbField_O_POBox, &val);
s << '"' << val << _T("\",");
}
Modified: trunk/M/src/gui/wxMDialogs.cpp
===================================================================
--- trunk/M/src/gui/wxMDialogs.cpp 2007-04-23 20:24:28 UTC (rev 7237)
+++ trunk/M/src/gui/wxMDialogs.cpp 2007-04-23 20:29:44 UTC (rev 7238)
@@ -1810,7 +1810,7 @@
// write test data encrypted with new password
p->writeEntry(MP_CRYPTALGO, newUseCrypt);
- if ( newPw )
+ if ( !newPw.empty() )
{
strutil_setpasswd(newPw);
}
Modified: trunk/M/src/modules/Filters.cpp
===================================================================
--- trunk/M/src/modules/Filters.cpp 2007-04-23 20:24:28 UTC (rev 7237)
+++ trunk/M/src/modules/Filters.cpp 2007-04-23 20:29:44 UTC (rev 7238)
@@ -696,7 +696,7 @@
public:
FunctionDefinition(const wxChar *name, FunctionPointer fptr)
: m_Name(name), m_FunctionPtr(fptr)
- { ASSERT(m_Name); ASSERT(m_FunctionPtr); }
+ { ASSERT(!m_Name.empty()); ASSERT(m_FunctionPtr); }
const wxChar *GetName(void) const { return m_Name; }
FunctionPointer GetFPtr(void) const { return m_FunctionPtr; }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.