fix -Wdeprecated in Part & FreeCADGui
This commit is contained in:
parent
14892bc880
commit
801ac34258
|
@ -86,7 +86,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_CLANGXX)
|
|||
if(BUILD_ENABLE_CXX11)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
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})
|
||||
|
||||
# get linker errors as soon as possible and not at runtime e.g. for modules
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#include <strstream>
|
||||
#include <sstream>
|
||||
|
||||
#include <App/Application.h>
|
||||
#include <App/Document.h>
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
#endif
|
||||
|
||||
|
||||
#include <strstream>
|
||||
#include <sstream>
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Writer.h>
|
||||
#include <Base/Reader.h>
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#endif
|
||||
|
||||
|
||||
#include <strstream>
|
||||
#include <Base/Console.h>
|
||||
#include <Base/Writer.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);
|
||||
if (file){
|
||||
unsigned long ulSize = 0;
|
||||
if (file) {
|
||||
//unsigned long ulSize = 0;
|
||||
std::streambuf* buf = file.rdbuf();
|
||||
if (buf) {
|
||||
unsigned long ulCurr;
|
||||
ulCurr = buf->pubseekoff(0, std::ios::cur, std::ios::in);
|
||||
ulSize = buf->pubseekoff(0, std::ios::end, std::ios::in);
|
||||
buf->pubseekoff(ulCurr, std::ios::beg, std::ios::in);
|
||||
}
|
||||
//if (buf) {
|
||||
// unsigned long ulCurr;
|
||||
// ulCurr = buf->pubseekoff(0, std::ios::cur, std::ios::in);
|
||||
// ulSize = buf->pubseekoff(0, std::ios::end, std::ios::in);
|
||||
// buf->pubseekoff(ulCurr, std::ios::beg, std::ios::in);
|
||||
//}
|
||||
|
||||
// read in the ASCII file and write back to the stream
|
||||
std::strstreambuf sbuf(ulSize);
|
||||
file >> &sbuf;
|
||||
writer.Stream() << &sbuf;
|
||||
//std::strstreambuf sbuf(ulSize);
|
||||
//file >> &sbuf;
|
||||
//writer.Stream() << &sbuf;
|
||||
writer.Stream() << buf;
|
||||
}
|
||||
|
||||
file.close();
|
||||
|
|
Loading…
Reference in New Issue
Block a user