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.
This commit is contained in:
James Turner
2017-07-19 13:00:33 +01:00
parent 46f67fce7a
commit fe46ae09ef
3 changed files with 44 additions and 3 deletions

View File

@@ -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

View File

@@ -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 <simgear/package/Delegate.hxx>
#include <simgear/package/Install.hxx>
#include <simgear/package/Package.hxx>
#include <simgear/package/Catalog.hxx>
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

View File

@@ -18,6 +18,7 @@
#ifndef SG_PACKAGE_DELEGATE_HXX
#define SG_PACKAGE_DELEGATE_HXX
#include <string>
#include <simgear/misc/stdint.hxx>
#include <simgear/structure/SGSharedPtr.hxx>
@@ -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