Author: mordante
Date: Sun Aug 24 18:11:50 2008
New Revision: 28937
URL: http://svn.gna.org/viewcvs/wesnoth?rev=28937&view=rev
Log:
MSVC 6 and 9 cleanup.
Now that MSVC 6 is no longer supported start to remove some helper code to work
around problems in that compiler. The first step is to comment out the code and
replace it with new helper code that uses the standard. The second step is to
remove the helper code and fix all callers.
Patch 1/3 for step 2: Clear global.hpp, but add some MSVC9 workarounds.
Modified:
trunk/changelog
trunk/src/global.hpp
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=28937&r1=28936&r2=28937&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sun Aug 24 18:11:50 2008
@@ -23,6 +23,8 @@
* Miscellaneous and bug fixes:
* Changed side_drop handling not to automaticaly assign AI for side if
leader is dead (bug #12186)
+ * Removed the compiler work arounds for MSVC6.
+ * Added some more compiler workarounds for MSVC9.
Version 1.5.3:
* Campaigns
Modified: trunk/src/global.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/global.hpp?rev=28937&r1=28936&r2=28937&view=diff
==============================================================================
--- trunk/src/global.hpp (original)
+++ trunk/src/global.hpp Sun Aug 24 18:11:50 2008
@@ -15,71 +15,17 @@
#ifndef DISABLE_4786_HPP_INCLUDED
#define DISABLE_4786_HPP_INCLUDED
-#if 0
-
-//for windows compilers
-#ifdef __MSVCRT__
-#ifndef __GNUC__
- #undef snprintf
- #define snprintf _snprintf
-#endif
-#endif
-
#ifdef _MSC_VER
#undef snprintf
#define snprintf _snprintf
-//disable the warning to let us know about 'this' being used in
-//initializer list, since it's a common thing to want to do
-//for callbacks, and there is no other way to easily workaround the warning
-#pragma warning(disable:4355)
+// Disable warnig about source encoding not in current code page.
+#pragma warning(disable: 4819)
-//disable the warnings for long template names
-#pragma warning(disable:4503)
-#pragma warning(disable:4786)
+// Disable warning about deprecated functions.
+#pragma warning(disable: 4996)
-//the following code causes the incredibly irritating warning 4786 to really
-//be muted in Visual C++ 6. No-one seems to know *why* it works (possibly not
even Microsoft)
-//but it does. So don't ask, and just leave it there.
-
-class warning4786WorkAround {
-public:
-warning4786WorkAround() {}
-};
-
-static warning4786WorkAround
VariableThatHacksWarning4786IntoBeingMutedForSomeUnknownReason;
-
-//put the mathematical functions where they belong: in the std namespace
-//it is necessary for VC6 at least
-#include <cmath>
-namespace std {
- using ::floor;
- using ::sqrt;
- using ::ceil;
- using ::fmod;
- using ::pow;
-}
-
-//put the FILE where it belongs: in the std namespace
-#include <cstdio>
-namespace std {
- using ::FILE;
- using ::fclose;
-}
-
-//put the Locale functions where they belong: in the std namespace
-#include <clocale>
-namespace std {
- using ::setlocale;
-}
-
-//put the string functions where they belong: in the std namespace
-#include <cstring>
-namespace std {
- using ::strrchr;
-}
+#endif
#endif
-#endif
-#endif
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits