[Scummvm-cvs-logs] SF.net SVN: scummvm:[42290] scummvm/trunk/sound

thebluegr at users.sourceforge.net thebluegr at users.sourceforge.net
Thu Jul 9 17:17:45 CEST 2009


Revision: 42290
          http://scummvm.svn.sourceforge.net/scummvm/?rev=42290&view=rev
Author:   thebluegr
Date:     2009-07-09 15:17:45 +0000 (Thu, 09 Jul 2009)

Log Message:
-----------
Added proper safeguards for shorten.*, thereby fixing commit 42259

Modified Paths:
--------------
    scummvm/trunk/sound/shorten.cpp
    scummvm/trunk/sound/shorten.h

Modified: scummvm/trunk/sound/shorten.cpp
===================================================================
--- scummvm/trunk/sound/shorten.cpp	2009-07-09 15:15:49 UTC (rev 42289)
+++ scummvm/trunk/sound/shorten.cpp	2009-07-09 15:17:45 UTC (rev 42290)
@@ -23,14 +23,10 @@
  *
  */
 
-// The code in this file is currently only used in SAGA2 (in the
-// SAGA engine), so if that engine isn't enabled, we will skip
-// compiling it. If you plan to use this code in another engine,
-// you will have to add the proper define check here.
-// Also please add the define check at the comment after the
-// matching #endif further down this file.
-#if defined(ENABLE_SAGA2)
+#include "sound/shorten.h"
 
+#ifdef SOUND_SHORTEN_H
+
 // Based on etree's Shorten tool, version 3.6.1
 // http://etree.org/shnutils/shorten/
 
@@ -40,7 +36,6 @@
 #include "common/util.h"
 #include "common/stream.h"
 
-#include "sound/shorten.h"
 #include "sound/audiostream.h"
 #include "sound/mixer.h"
 
@@ -535,5 +530,5 @@
 
 } // End of namespace Audio
 
-#endif // defined(ENABLE_SAGA2)
+#endif // defined(SOUND_SHORTEN_H)
 

Modified: scummvm/trunk/sound/shorten.h
===================================================================
--- scummvm/trunk/sound/shorten.h	2009-07-09 15:15:49 UTC (rev 42289)
+++ scummvm/trunk/sound/shorten.h	2009-07-09 15:17:45 UTC (rev 42290)
@@ -23,6 +23,14 @@
  *
  */
 
+// The code in this file is currently only used in SAGA2 (in the
+// SAGA engine), so if that engine isn't enabled, we will skip
+// compiling it. If you plan to use this code in another engine,
+// you will have to add the proper define check here.
+// Also please add the define check at the comment after the
+// matching #endif further down this file.
+#if defined(ENABLE_SAGA2)
+
 #ifndef SOUND_SHORTEN_H
 #define SOUND_SHORTEN_H
 
@@ -53,3 +61,7 @@
 } // End of namespace Audio
 
 #endif
+
+#endif // defined(ENABLE_SAGA2)
+
+


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list