From: guigues Date: Mon, 15 Dec 2008 12:54:44 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: EED.02Oct2009~211 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=121c751257f813b87a554f19807bf757a8eae8da;p=creaImageIO.git *** empty log message *** --- diff --git a/src/CppSQLite3.cpp b/src/CppSQLite3.cpp index 5d82661..165f911 100644 --- a/src/CppSQLite3.cpp +++ b/src/CppSQLite3.cpp @@ -45,21 +45,37 @@ int sqlite3_decode_binary(const unsigned char *in, unsigned char *out); //////////////////////////////////////////////////////////////////////////////// CppSQLite3Exception::CppSQLite3Exception(const int nErrCode, - char* szErrMess, - bool bDeleteMsg/*=true*/) : - mnErrCode(nErrCode) -{ - mpszErrMess = sqlite3_mprintf("%s[%d]: %s", - errorCodeAsString(nErrCode), - nErrCode, - szErrMess ? szErrMess : ""); - - if (bDeleteMsg && szErrMess) - { - sqlite3_free(szErrMess); - } + const char* szErrMess, + bool bDeleteMsg/*=true*/) : + mnErrCode(nErrCode) +{ + mpszErrMess = sqlite3_mprintf("%s[%d]: %s", + errorCodeAsString(nErrCode), + nErrCode, + szErrMess ? szErrMess : ""); + /* + if (bDeleteMsg && szErrMess) + { + sqlite3_free(szErrMess); + } + */ } +CppSQLite3Exception::CppSQLite3Exception(const int nErrCode, + char* szErrMess, + bool bDeleteMsg/*=true*/) : + mnErrCode(nErrCode) +{ + mpszErrMess = sqlite3_mprintf("%s[%d]: %s", + errorCodeAsString(nErrCode), + nErrCode, + szErrMess ? szErrMess : ""); + + if (bDeleteMsg && szErrMess) + { + sqlite3_free(szErrMess); + } +} CppSQLite3Exception::CppSQLite3Exception(const CppSQLite3Exception& e) : mnErrCode(e.mnErrCode) @@ -1310,7 +1326,7 @@ sqlite3_stmt* CppSQLite3DB::compile(const char* szSQL) ** data in an SQLite database. The code in this file is not used by any other ** part of the SQLite library. ** -** $Id: CppSQLite3.cpp,v 1.1 2008/09/26 14:15:48 guigues Exp $ +** $Id: CppSQLite3.cpp,v 1.2 2008/12/15 12:54:44 guigues Exp $ */ /* diff --git a/src/CppSQLite3.h b/src/CppSQLite3.h index 891170b..c45c9cb 100644 --- a/src/CppSQLite3.h +++ b/src/CppSQLite3.h @@ -39,9 +39,12 @@ class CppSQLite3Exception public: CppSQLite3Exception(const int nErrCode, - char* szErrMess, - bool bDeleteMsg=true); - + char* szErrMess, + bool bDeleteMsg=true); + CppSQLite3Exception(const int nErrCode, + const char* szErrMess, + bool bDeleteMsg=true); + CppSQLite3Exception(const CppSQLite3Exception& e); virtual ~CppSQLite3Exception(); diff --git a/src/icons/database.xpm b/src/icons/database.xpm index f662084..8dc871e 100644 --- a/src/icons/database.xpm +++ b/src/icons/database.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * database_xpm[] = { +static const char * database_xpm[] = { "48 48 293 2", " c None", ". c #9E9FA2", diff --git a/src/icons/dicomdir.xpm b/src/icons/dicomdir.xpm index 5f07183..036df73 100644 --- a/src/icons/dicomdir.xpm +++ b/src/icons/dicomdir.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * dicomdir_xpm[] = { +static const char * dicomdir_xpm[] = { "48 48 725 2", " c None", ". c #B48400", diff --git a/src/icons/folder.xpm b/src/icons/folder.xpm index f3d5c4e..c126c5d 100644 --- a/src/icons/folder.xpm +++ b/src/icons/folder.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * folder_xpm[] = { +static const char * folder_xpm[] = { "48 48 465 2", " c None", ". c #BF8F00", diff --git a/src/icons/image.xpm b/src/icons/image.xpm index e2b7d1a..c4fde0c 100644 --- a/src/icons/image.xpm +++ b/src/icons/image.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * image_xpm[] = { +static const char * image_xpm[] = { "48 48 571 2", " c None", ". c #BC8B00", diff --git a/src/icons/patient.xpm b/src/icons/patient.xpm index 030074e..fdaf6c1 100644 --- a/src/icons/patient.xpm +++ b/src/icons/patient.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * patient_xpm[] = { +static const char * patient_xpm[] = { "48 48 687 2", " c None", ". c #E7903C", diff --git a/src/icons/root.xpm b/src/icons/root.xpm index 751f8ce..3b66419 100644 --- a/src/icons/root.xpm +++ b/src/icons/root.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * root_xpm[] = { +static const char * root_xpm[] = { "48 48 833 2", " c None", ". c #B10505", diff --git a/src/icons/series.xpm b/src/icons/series.xpm index 1a94d6a..749ceee 100644 --- a/src/icons/series.xpm +++ b/src/icons/series.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * series_xpm[] = { +static const char * series_xpm[] = { "48 48 886 2", " c None", ". c #007CBA", diff --git a/src/icons/study.xpm b/src/icons/study.xpm index 0a29012..d16c3d1 100644 --- a/src/icons/study.xpm +++ b/src/icons/study.xpm @@ -1,5 +1,5 @@ /* XPM */ -static char * study_xpm[] = { +static const char * study_xpm[] = { "48 48 536 2", " c None", ". c #9D9EA1",