From a3396a06b8e344f1b5ed612b3d34d6c91683d550 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Tue, 28 Mar 2017 22:01:50 +0300 Subject: [PATCH] Fix shared_ptr usage The std::shared_ptr type was used instead of std::tr1::shared_ptr. A NULL pointer was also implicitly cast into a Backend pointer which caused compilation problems on some platforms with the tr1 version of shared_ptr. --- server/modules/routing/schemarouter/schemarouter.hh | 2 +- server/modules/routing/schemarouter/schemaroutersession.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/modules/routing/schemarouter/schemarouter.hh b/server/modules/routing/schemarouter/schemarouter.hh index a2f50d5d2..3985d9130 100644 --- a/server/modules/routing/schemarouter/schemarouter.hh +++ b/server/modules/routing/schemarouter/schemarouter.hh @@ -35,7 +35,7 @@ using std::list; using std::set; using std::string; -using std::shared_ptr; +using std::tr1::shared_ptr; using maxscale::Buffer; diff --git a/server/modules/routing/schemarouter/schemaroutersession.cc b/server/modules/routing/schemarouter/schemaroutersession.cc index 5ba3dd120..6aaf52381 100644 --- a/server/modules/routing/schemarouter/schemaroutersession.cc +++ b/server/modules/routing/schemarouter/schemaroutersession.cc @@ -865,7 +865,7 @@ SBackend SchemaRouterSession::get_bref_from_dcb(DCB* dcb) // This should not happen ss_dassert(false); - return SBackend(NULL); + return SBackend(reinterpret_cast(NULL)); } /**