diff --git a/uppsrc/Sql/Session.cpp b/uppsrc/Sql/Session.cpp index 9e58386ba..f33447748 100644 --- a/uppsrc/Sql/Session.cpp +++ b/uppsrc/Sql/Session.cpp @@ -153,7 +153,7 @@ Sql& AppCursor() return sGlobalSession->GetSessionSql(); static Sql *empty; ONCELOCK { - static Sql h(Sql::NULLSQL); + static Sql0 h; empty = &h; } return *empty; @@ -175,7 +175,7 @@ Sql& AppCursorR() return sGlobalSession->GetSessionSqlR(); static Sql *empty; ONCELOCK { - static Sql h(Sql::NULLSQL); + static Sql0 h; empty = &h; } return *empty; diff --git a/uppsrc/Sql/Sqls.h b/uppsrc/Sql/Sqls.h index b7995ed50..3ea54c56a 100644 --- a/uppsrc/Sql/Sqls.h +++ b/uppsrc/Sql/Sqls.h @@ -92,8 +92,6 @@ class Sql { friend Sql& AppCursorR(); Value Select0(const String& what); - enum _NULLSQL { NULLSQL }; - Sql(_NULLSQL) { cn = NULL; } public: void SetSession(SqlSource& src); @@ -251,6 +249,10 @@ private: Sql(const Sql&); }; +struct Sql0 : Sql { + Sql0() : Sql((SqlConnection *)NULL) {} +}; + #ifndef NOAPPSQL struct SqlR : Sql { SqlR();