(2.5) blender uses deprecated 'strstream' STL class, causes warnings with gcc
Closed, ArchivedPublic

Description

I am using blender 2.5 from SVN (revision 22463) and I get a compilation warning:

"This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the ++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <iostream> instead of the deprecated header iostream.h>. To disable this warning use -Wno-deprecated."

I am using gcc 4. The problem seems to be that source/gameengine/VideoTexture/Exception.cpp includes <strstream> and uses 'ostrstream' objects which are considered obsolete.

Attached there is a patch that use 'ostringstream' objects, removing a lot of potential problems related to the obsolete STL 'strstream' class.

Hope to be useful.
Mauro Toffanin

p.s.: there aren't <strstream> declarations in the source code other than the one from Exception.cpp.

committed rev 22709, thanks for the patch!

Campbell Barton (campbellbarton) closed this task as "Archived".Via Old WorldAug 22 2009, 7:19 PM

Add Comment