fix -Wdeprecated in Part & FreeCADGui

This commit is contained in:
wmayer 2016-09-22 15:32:49 +02:00
parent 14892bc880
commit 801ac34258
4 changed files with 15 additions and 15 deletions

View File

@ -86,7 +86,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
if(BUILD_ENABLE_CXX11) if(BUILD_ENABLE_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
endif(BUILD_ENABLE_CXX11) endif(BUILD_ENABLE_CXX11)
set(CMAKE_CXX_FLAGS "-Wall -Wno-deprecated -Wno-write-strings ${CMAKE_CXX_FLAGS}") set(CMAKE_CXX_FLAGS "-Wall -Wno-write-strings ${CMAKE_CXX_FLAGS}")
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
# get linker errors as soon as possible and not at runtime e.g. for modules # get linker errors as soon as possible and not at runtime e.g. for modules

View File

@ -23,7 +23,7 @@
#include "PreCompiled.h" #include "PreCompiled.h"
#include <strstream> #include <sstream>
#include <App/Application.h> #include <App/Application.h>
#include <App/Document.h> #include <App/Document.h>

View File

@ -43,7 +43,7 @@
#endif #endif
#include <strstream> #include <sstream>
#include <Base/Console.h> #include <Base/Console.h>
#include <Base/Writer.h> #include <Base/Writer.h>
#include <Base/Reader.h> #include <Base/Reader.h>

View File

@ -44,7 +44,6 @@
#endif #endif
#include <strstream>
#include <Base/Console.h> #include <Base/Console.h>
#include <Base/Writer.h> #include <Base/Writer.h>
#include <Base/Reader.h> #include <Base/Reader.h>
@ -312,20 +311,21 @@ void PropertyPartShape::SaveDocFile (Base::Writer &writer) const
} }
Base::ifstream file(fi, std::ios::in | std::ios::binary); Base::ifstream file(fi, std::ios::in | std::ios::binary);
if (file){ if (file) {
unsigned long ulSize = 0; //unsigned long ulSize = 0;
std::streambuf* buf = file.rdbuf(); std::streambuf* buf = file.rdbuf();
if (buf) { //if (buf) {
unsigned long ulCurr; // unsigned long ulCurr;
ulCurr = buf->pubseekoff(0, std::ios::cur, std::ios::in); // ulCurr = buf->pubseekoff(0, std::ios::cur, std::ios::in);
ulSize = buf->pubseekoff(0, std::ios::end, std::ios::in); // ulSize = buf->pubseekoff(0, std::ios::end, std::ios::in);
buf->pubseekoff(ulCurr, std::ios::beg, std::ios::in); // buf->pubseekoff(ulCurr, std::ios::beg, std::ios::in);
} //}
// read in the ASCII file and write back to the stream // read in the ASCII file and write back to the stream
std::strstreambuf sbuf(ulSize); //std::strstreambuf sbuf(ulSize);
file >> &sbuf; //file >> &sbuf;
writer.Stream() << &sbuf; //writer.Stream() << &sbuf;
writer.Stream() << buf;
} }
file.close(); file.close();