Log In
New Account
Home My Page Projects Blender 2.x BF release
Summary Activity Tracker SCM Files

Patches: Browse

[#19226] (2.5) blender uses deprecated 'strstream' STL class, causes warnings with gcc

Date:
2009-08-15 13:05
Priority:
3
State:
Closed
Submitted by:
Mauro Toffanin (equilibrium)
Assigned to:
Campbell Barton (campbellbarton)
Category:
Game engine
Group:
None
Resolution(Old, use status):
Approved
Resolution:
Patch for:
 
Summary:
(2.5) blender uses deprecated 'strstream' STL class, causes warnings with gcc
Detailed 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.

Followup

Message
  • Date: 2009-08-22 19:19
  • Sender: Campbell Barton
  • committed rev 22709, thanks for the patch!
 

Attached Files:

Name Date Download
blender-headers.patch 2009-08-15 13:05 Download

Changes:

Field Old Value Date By
CategoryNone2009-08-22 19:19campbellbarton
ResolutionNone2009-08-22 19:19campbellbarton
close_date2009-08-22 19:192009-08-22 19:19campbellbarton
assigned_tonone2009-08-22 19:19campbellbarton
status_idOpen2009-08-22 19:19campbellbarton
File Added8579: blender-headers.patch2009-08-15 13:05equilibrium