mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 09:46:02 -04:00
Fix CppDepends most useful warnings:
- Convert last old-style cast to reinterpret_cast<> - Statement::Ptr is now private, with a friend declaration for Column - noexcept should not be defined as the depreacted throw()
This commit is contained in:
parent
8c7aced3fb
commit
d36c39ccf3
@ -45,10 +45,14 @@ public:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Detect whether the compiler supports C++11 noexcept exception specifications.
|
// Detect whether the compiler supports C++11 noexcept exception specifications.
|
||||||
#if (defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4)) && defined(__GXX_EXPERIMENTAL_CXX0X__))
|
#if ( defined(__GNUC__) && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 7) || (__GNUC__ > 4)) \
|
||||||
|
&& defined(__GXX_EXPERIMENTAL_CXX0X__))
|
||||||
// GCC 4.7 and following have noexcept
|
// GCC 4.7 and following have noexcept
|
||||||
#elif defined(__clang__) && __has_feature(cxx_noexcept)
|
#elif defined(__clang__) && __has_feature(cxx_noexcept)
|
||||||
// Clang 3.0 and above have noexcept
|
// Clang 3.0 and above have noexcept
|
||||||
|
#elif defined(_MSC_VER) && _MSC_VER > 1800
|
||||||
|
// Visual Studio 2015 and above have noexcept
|
||||||
#else
|
#else
|
||||||
#define noexcept throw()
|
// Visual Studio 2013 does not support noexcept, and "throw()" is deprecated by C++11
|
||||||
|
#define noexcept
|
||||||
#endif
|
#endif
|
||||||
|
@ -44,9 +44,9 @@ class Column;
|
|||||||
*/
|
*/
|
||||||
class Statement
|
class Statement
|
||||||
{
|
{
|
||||||
public:
|
friend class Column; // For access to Statement::Ptr inner class
|
||||||
class Ptr;
|
|
||||||
|
|
||||||
|
public:
|
||||||
/**
|
/**
|
||||||
* @brief Compile and register the SQL query for the provided SQLite Database Connection
|
* @brief Compile and register the SQL query for the provided SQLite Database Connection
|
||||||
*
|
*
|
||||||
@ -400,7 +400,7 @@ public:
|
|||||||
return sqlite3_errmsg(mStmtPtr);
|
return sqlite3_errmsg(mStmtPtr);
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
private:
|
||||||
/**
|
/**
|
||||||
* @brief Shared pointer to the sqlite3_stmt SQLite Statement Object.
|
* @brief Shared pointer to the sqlite3_stmt SQLite Statement Object.
|
||||||
*
|
*
|
||||||
|
@ -65,7 +65,7 @@ double Column::getDouble() const noexcept // nothrow
|
|||||||
// Return a pointer to the text value (NULL terminated string) of the column specified by its index starting at 0
|
// Return a pointer to the text value (NULL terminated string) of the column specified by its index starting at 0
|
||||||
const char* Column::getText(const char* apDefaultValue /* = "" */) const noexcept // nothrow
|
const char* Column::getText(const char* apDefaultValue /* = "" */) const noexcept // nothrow
|
||||||
{
|
{
|
||||||
const char* pText = (const char*)sqlite3_column_text(mStmtPtr, mIndex);
|
const char* pText = reinterpret_cast<const char*>(sqlite3_column_text(mStmtPtr, mIndex));
|
||||||
return (pText?pText:apDefaultValue);
|
return (pText?pText:apDefaultValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user