+ move implementation of Base::ifstream and Base::ofstream to header and remove export macro.

This is needed for VS 2013 to avoid that it exports methods of the base class and thus causing linker errors for modules that link FreeCADBase
This commit is contained in:
wmayer
2018-07-25 17:50:30 +02:00
parent 3b3e4fd4ce
commit 1fcfbcf1ab
2 changed files with 25 additions and 36 deletions

View File

@@ -39,7 +39,6 @@
#include "Stream.h"
#include "Swap.h"
#include "FileInfo.h"
#include <CXX/Objects.hxx>
using namespace Base;
@@ -785,32 +784,3 @@ Streambuf::seekpos(std::streambuf::pos_type pos,
{
return seekoff(pos, std::ios_base::beg);
}
// ---------------------------------------------------------
Base::ofstream::ofstream(const FileInfo& fi, ios_base::openmode mode)
#ifdef _MSC_VER
: std::ofstream(fi.toStdWString().c_str(), mode)
#else
: std::ofstream(fi.filePath().c_str(), mode)
#endif
{
}
Base::ofstream::~ofstream()
{
}
Base::ifstream::ifstream(const FileInfo& fi, ios_base::openmode mode)
#ifdef _MSC_VER
: std::ifstream(fi.toStdWString().c_str(), mode)
#else
: std::ifstream(fi.filePath().c_str(), mode)
#endif
{
}
Base::ifstream::~ifstream()
{
}