File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 1414
1515#define CPPSQLITE_ERROR 1000
1616
17+ #if defined(__GNUC__) || defined(__clang__)
18+ #define CPPSQLITE_ATTR_CONST __attribute__ ((const ))
19+ #else
20+ #define CPPSQLITE_ATTR_CONST
21+ #endif
22+
1723namespace detail {
1824/* *
1925 * RAII class for managing memory allocated by sqlite
@@ -69,7 +75,7 @@ class CppSQLite3Exception : public std::exception {
6975
7076 const char *what () const noexcept override { return mpszErrMess; }
7177
72- static const char *errorCodeAsString (int nErrCode);
78+ static const char *errorCodeAsString (int nErrCode) CPPSQLITE_ATTR_CONST ;
7379
7480 private:
7581 char *mpszErrMess;
@@ -306,4 +312,5 @@ class CppSQLite3DB {
306312 int mnBusyTimeoutMs;
307313};
308314
315+ #undef CPPSQLITE_ATTR_CONST
309316#endif
You can’t perform that action at this time.
0 commit comments