diff options
Diffstat (limited to 'qtools')
-rw-r--r-- | qtools/qcstring.h | 2 | ||||
-rw-r--r-- | qtools/qfile_win32.cpp | 2 | ||||
-rw-r--r-- | qtools/qstring.cpp | 6 |
3 files changed, 6 insertions, 4 deletions
diff --git a/qtools/qcstring.h b/qtools/qcstring.h index 4f15b18..abf30b3 100644 --- a/qtools/qcstring.h +++ b/qtools/qcstring.h @@ -149,7 +149,7 @@ public: /** creates a string with room for size characters * @param[in] size the number of character to allocate (including the 0-terminator) */ - QCString( int size ) : m_rep(size) + explicit QCString( int size ) : m_rep(size) { } diff --git a/qtools/qfile_win32.cpp b/qtools/qfile_win32.cpp index 80ad628..a4ab013 100644 --- a/qtools/qfile_win32.cpp +++ b/qtools/qfile_win32.cpp @@ -264,7 +264,7 @@ bool QFile::open( int m ) } else { length = (int)st.st_size; ioIndex = (flags() & IO_Append) == 0 ? 0 : length; - if ( (flags() & !IO_Truncate) && length == 0 && isReadable() ) { + if ( !(flags()&IO_Truncate) && length == 0 && isReadable() ) { // try if you can read from it (if you can, it's a sequential // device; e.g. a file in the /proc filesystem) int c = getch(); diff --git a/qtools/qstring.cpp b/qtools/qstring.cpp index 458fd53..d831cb1 100644 --- a/qtools/qstring.cpp +++ b/qtools/qstring.cpp @@ -11957,7 +11957,8 @@ QString QString::visual(int index, int len) QChar* QString::asciiToUnicode( const QByteArray& ba, uint* len ) { if ( ba.isNull() ) { - *len = 0; + if ( len ) + *len = 0; return 0; } int l = 0; @@ -11976,7 +11977,8 @@ QChar* QString::asciiToUnicode( const QByteArray& ba, uint* len ) static QChar* internalAsciiToUnicode( const QByteArray& ba, uint* len ) { if ( ba.isNull() ) { - *len = 0; + if ( len ) + *len = 0; return 0; } int l = 0; |