From fe46ae09efae057276f5c2286f700e159e210d19 Mon Sep 17 00:00:00 2001 From: James Turner Date: Wed, 19 Jul 2017 13:00:33 +0100 Subject: [PATCH] Fix MSVC build. MSVC really needs these methods to be out of line, to avoid generating code for the shared pointers in each translation unit which includes the header. --- simgear/package/CMakeLists.txt | 1 + simgear/package/Delegate.cxx | 39 ++++++++++++++++++++++++++++++++++ simgear/package/Delegate.hxx | 7 +++--- 3 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 simgear/package/Delegate.cxx diff --git a/simgear/package/CMakeLists.txt b/simgear/package/CMakeLists.txt index 2c4067bd..7344adb3 100644 --- a/simgear/package/CMakeLists.txt +++ b/simgear/package/CMakeLists.txt @@ -14,6 +14,7 @@ set(SOURCES Package.cxx Install.cxx Root.cxx + Delegate.cxx # internal helpers md5.h md5.c ioapi.c ioapi_mem.c ioapi.h diff --git a/simgear/package/Delegate.cxx b/simgear/package/Delegate.cxx new file mode 100644 index 00000000..bd3188eb --- /dev/null +++ b/simgear/package/Delegate.cxx @@ -0,0 +1,39 @@ +// Copyright (C) 2017 James Turner - zakalawe@mac.com +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Library General Public +// License as published by the Free Software Foundation; either +// version 2 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Library General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// + +#include +#include +#include +#include + +namespace simgear +{ + + namespace pkg + { + + void Delegate::installStatusChanged(InstallRef aInstall, StatusCode aReason) + { + } + + void Delegate::dataForThumbnail(const std::string& aThumbnailUrl, + size_t lenth, const uint8_t* bytes) + { + } + + } // of namespace pkg +} // of namespace simgear diff --git a/simgear/package/Delegate.hxx b/simgear/package/Delegate.hxx index 9116f0d0..df59256c 100644 --- a/simgear/package/Delegate.hxx +++ b/simgear/package/Delegate.hxx @@ -18,6 +18,7 @@ #ifndef SG_PACKAGE_DELEGATE_HXX #define SG_PACKAGE_DELEGATE_HXX +#include #include #include @@ -81,10 +82,10 @@ public: * More general purpose notification when install is queued / cancelled / started * stopped. Reason value is only in certain cases. */ - virtual void installStatusChanged(InstallRef aInstall, StatusCode aReason) {}; + virtual void installStatusChanged(InstallRef aInstall, StatusCode aReason); - virtual void dataForThumbnail(const std::string& aThumbnailUrl, - size_t lenth, const uint8_t* bytes) {} + virtual void dataForThumbnail(const std::string& aThumbnailUrl, + size_t lenth, const uint8_t* bytes); }; } // of namespace pkg