mirror of
https://github.com/cuberite/SQLiteCpp.git
synced 2025-08-04 09:46:02 -04:00
Renamed Assert.h to Assertion.h for Win32 build
- MSVC was confused about cassert/assert.h vs Assert.h
This commit is contained in:
parent
256dedfa1e
commit
c84e5122d3
@ -16,8 +16,8 @@ if (SQLITE_ENABLE_COLUMN_METADATA)
|
||||
add_definitions(-DSQLITE_ENABLE_COLUMN_METADATA)
|
||||
endif()
|
||||
|
||||
# Enable the user defintion of a assertion_failed() handler.
|
||||
add_definitions(-DSQLITECPP_ENABLE_ASSERT_HANDLER)
|
||||
|
||||
|
||||
if (MSVC)
|
||||
# build the SQLite3 C library for Windows (for ease of use)
|
||||
|
@ -217,7 +217,7 @@ namespace SQLite
|
||||
void assertion_failed(const char* apFile, const long apLine, const char* apFunc, const char* apExpr, const char* apMsg)
|
||||
{
|
||||
// Print a message to the standard error output stream, and abort the program.
|
||||
std::cerr << apFile << ":" << apLine << ":" << " error: assertion (" << apExpr << ") failed in '" << apFunc << "' (" << apMsg << ")\n";
|
||||
std::cerr << apFile << ":" << apLine << ":" << " error: assertion failed (" << apExpr << ") in " << apFunc << "() with message \"" << apMsg << "\"\n";
|
||||
std::abort();
|
||||
}
|
||||
}
|
||||
|
@ -11,8 +11,8 @@
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <cstdlib>
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ namespace SQLite
|
||||
void assertion_failed(const char* apFile, const long apLine, const char* apFunc, const char* apExpr, const char* apMsg)
|
||||
{
|
||||
// Print a message to the standard error output stream, and abort the program.
|
||||
std::cerr << apFile << ":" << apLine << ":" << " error: assertion (" << apExpr << ") failed in " << apFunc << ": '" << apMsg << "'\n";
|
||||
std::cerr << apFile << ":" << apLine << ":" << " error: assertion failed (" << apExpr << ") in " << apFunc << "() with message \"" << apMsg << "\"\n";
|
||||
std::abort();
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file Assert.h
|
||||
* @file Assertion.h
|
||||
* @ingroup SQLiteCpp
|
||||
* @brief Definition of the SQLITECPP_ASSERT() macro.
|
||||
*
|
||||
@ -39,14 +39,8 @@ namespace SQLite
|
||||
#else
|
||||
|
||||
// if no assert handler provided by user code, use standard assert()
|
||||
|
||||
#ifndef NDEBUG
|
||||
// in debug mode, assert() :
|
||||
#define SQLITECPP_ASSERT(expression,message) assert(expression)
|
||||
#else
|
||||
// in release mode, nothing :
|
||||
#define SQLITECPP_ASSERT(expression,message) (expression)
|
||||
#endif
|
||||
// (note: in debug mode, assert() does nothing)
|
||||
#define SQLITECPP_ASSERT(expression,message) assert(expression && message)
|
||||
|
||||
#endif
|
||||
|
@ -12,7 +12,7 @@
|
||||
# add sources of the wrapper as a "SQLiteCpp" static library
|
||||
add_library (SQLiteCpp
|
||||
SQLiteC++.h
|
||||
Assert.h
|
||||
Assertion.h
|
||||
Column.cpp
|
||||
Column.h
|
||||
Database.cpp
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "Database.h"
|
||||
|
||||
#include "Statement.h"
|
||||
#include "Assert.h"
|
||||
#include "Assertion.h"
|
||||
#include "Exception.h"
|
||||
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
|
||||
// Include useful headers of SQLiteC++
|
||||
#include "Assert.h"
|
||||
#include "Assertion.h"
|
||||
#include "Exception.h"
|
||||
#include "Database.h"
|
||||
#include "Statement.h"
|
||||
|
@ -12,7 +12,7 @@
|
||||
|
||||
#include "Database.h"
|
||||
#include "Column.h"
|
||||
#include "Assert.h"
|
||||
#include "Assertion.h"
|
||||
#include "Exception.h"
|
||||
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "Transaction.h"
|
||||
|
||||
#include "Database.h"
|
||||
#include "Assert.h"
|
||||
#include "Assertion.h"
|
||||
#include "Exception.h"
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user