Skip to content

Commit 05eeb87

Browse files
committedOct 9, 2017
Init bool value in header and do not init qstring attributes with empty value
1 parent 622fbfd commit 05eeb87

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed
 

‎src/core/qgsauxiliarystorage.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,7 @@ bool QgsAuxiliaryLayer::save()
261261
//
262262

263263
QgsAuxiliaryStorage::QgsAuxiliaryStorage( const QgsProject &project, bool copy )
264-
: mValid( false )
265-
, mFileName( QString() )
266-
, mTmpFileName( QString() )
267-
, mCopy( copy )
264+
: mCopy( copy )
268265
{
269266
initTmpFileName();
270267

@@ -278,9 +275,7 @@ QgsAuxiliaryStorage::QgsAuxiliaryStorage( const QgsProject &project, bool copy )
278275
}
279276

280277
QgsAuxiliaryStorage::QgsAuxiliaryStorage( const QString &filename, bool copy )
281-
: mValid( false )
282-
, mFileName( filename )
283-
, mTmpFileName( QString() )
278+
: mFileName( filename )
284279
, mCopy( copy )
285280
{
286281
initTmpFileName();

‎src/core/qgsauxiliarystorage.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,10 @@ class CORE_EXPORT QgsAuxiliaryStorage
305305
static bool exec( const QString &sql, sqlite3 *handler );
306306
static void debugMsg( const QString &sql, sqlite3 *handler );
307307

308-
bool mValid;
308+
bool mValid = false;
309309
QString mFileName; // original filename
310310
QString mTmpFileName; // temporary filename used in copy mode
311-
bool mCopy;
311+
bool mCopy = false;
312312
};
313313

314314
#endif

0 commit comments

Comments
 (0)