mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-14 13:30:48 +03:00
0024792: Remove unused hacks for compilers without STL
This commit is contained in:
@@ -250,12 +250,8 @@ static Standard_Integer CommandCmd
|
||||
|
||||
// get the error message
|
||||
Standard_SStream ss;
|
||||
ss << "** Exception ** " << E << ends ;
|
||||
#ifdef USE_STL_STREAM
|
||||
ss << "** Exception ** " << E << ends;
|
||||
Tcl_SetResult(interp,(char*)(ss.str().c_str()),TCL_VOLATILE);
|
||||
#else
|
||||
Tcl_SetResult(interp,(char*)(ss.str()),TCL_VOLATILE);
|
||||
#endif
|
||||
code = TCL_ERROR;
|
||||
}
|
||||
|
||||
@@ -500,14 +496,7 @@ Draw_Interpretor& Draw_Interpretor::Append(const Standard_Real r)
|
||||
|
||||
Draw_Interpretor& Draw_Interpretor::Append(const Standard_SStream& s)
|
||||
{
|
||||
#ifdef USE_STL_STREAM
|
||||
return Append (s.str().c_str());
|
||||
#else
|
||||
// Note: use dirty tricks -- unavoidable with old streams
|
||||
TCollection_AsciiString aStr (((Standard_SStream&)AReason).str(), AReason.pcount());
|
||||
((Standard_SStream&)AReason).freeze (false);
|
||||
return Append (aStr.ToCString());
|
||||
#endif
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@@ -22,12 +22,6 @@
|
||||
#include <Standard_Stream.hxx>
|
||||
#include <Standard_SStream.hxx>
|
||||
|
||||
#if defined(HAVE_IOS) || defined(WNT)
|
||||
# include <ios>
|
||||
#elif defined(HAVE_IOS_H)
|
||||
# include <ios.h>
|
||||
#endif
|
||||
|
||||
#include <Draw_Display.hxx>
|
||||
#include <Draw_Appli.hxx>
|
||||
#include <Draw_Number.hxx>
|
||||
@@ -39,6 +33,8 @@
|
||||
#include <Draw_VMap.hxx>
|
||||
#include <Draw_ProgressIndicator.hxx>
|
||||
|
||||
#include <ios>
|
||||
|
||||
#ifdef WNT
|
||||
extern Draw_Viewer dout;
|
||||
#endif
|
||||
@@ -120,27 +116,16 @@ static Standard_Boolean numtest(const Handle(Draw_Drawable3D)& d)
|
||||
return d->IsInstance(STANDARD_TYPE(Draw_Number));
|
||||
}
|
||||
|
||||
static void numsave(const Handle(Draw_Drawable3D)&d, ostream& OS)
|
||||
static void numsave (const Handle(Draw_Drawable3D)& theDrawable,
|
||||
ostream& theStream)
|
||||
{
|
||||
Handle(Draw_Number) N = Handle(Draw_Number)::DownCast(d);
|
||||
#if (defined(HAVE_IOS) && !defined(__sgi) && !defined(IRIX)) || ( defined(WNT) && !defined(USE_OLD_STREAMS))
|
||||
ios::fmtflags F = OS.flags();
|
||||
OS.setf(ios::scientific);
|
||||
OS.precision(15);
|
||||
OS.width(30);
|
||||
#else
|
||||
long form = OS.setf(ios::scientific);
|
||||
int prec = OS.precision(15);
|
||||
int w = OS.width(30);
|
||||
#endif
|
||||
OS << N->Value()<<"\n";
|
||||
#if (defined(HAVE_IOS) && !defined(__sgi) && !defined(IRIX)) || (defined(WNT)&& !defined(USE_OLD_STREAMS))
|
||||
OS.setf(F);
|
||||
#else
|
||||
OS.setf(form);
|
||||
OS.precision(prec);
|
||||
OS.width(w);
|
||||
#endif
|
||||
Handle(Draw_Number) aNum = Handle(Draw_Number)::DownCast (theDrawable);
|
||||
ios::fmtflags aFlags = theStream.flags();
|
||||
theStream.setf (ios::scientific);
|
||||
theStream.precision (15);
|
||||
theStream.width (30);
|
||||
theStream << aNum->Value() << "\n";
|
||||
theStream.setf (aFlags);
|
||||
}
|
||||
|
||||
static Handle(Draw_Drawable3D) numrestore (istream& is)
|
||||
|
Reference in New Issue
Block a user