comparison OrthancFramework/Sources/SQLite/Connection.h @ 5357:fddb5d8d0021

Prevent the leak of the full path of the source files in the binaries
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 06 Jul 2023 17:04:31 +0200
parents 0ea402b4d901
children 48b8dae6dc77
comparison
equal deleted inserted replaced
5354:65b4e6ae2703 5357:fddb5d8d0021
44 #include "SQLiteTypes.h" 44 #include "SQLiteTypes.h"
45 45
46 #include <string> 46 #include <string>
47 #include <map> 47 #include <map>
48 48
49 #define SQLITE_FROM_HERE ::Orthanc::SQLite::StatementId(__FILE__, __LINE__) 49 #if !defined(__ORTHANC_FILE__)
50 # if defined(_MSC_VER)
51 # pragma message("Warning: Macro __ORTHANC_FILE__ is not defined, this will leak the full path of the source files in the binaries")
52 # else
53 # warning Warning: Macro __ORTHANC_FILE__ is not defined, this will leak the full path of the source files in the binaries
54 # endif
55 # define __ORTHANC_FILE__ __FILE__
56 #endif
57
58 #define SQLITE_FROM_HERE ::Orthanc::SQLite::StatementId(__ORTHANC_FILE__, __LINE__)
50 59
51 namespace Orthanc 60 namespace Orthanc
52 { 61 {
53 namespace SQLite 62 namespace SQLite
54 { 63 {