Author: shadowmaster
Date: Wed Oct 26 10:59:53 2011
New Revision: 51653
URL: http://svn.gna.org/viewcvs/wesnoth?rev=51653&view=rev
Log:
Fix bug #18766 by removing some half-assed "recursion prevention" bullshit I
devised back in 2008
A static counter variable wasn't being reset, ever, so a number of
version comparisons during a single session would make the code stop
working.
The basic idea is idiotic and I should probably rewrite this code ASAP.
Modified:
trunk/changelog
trunk/src/version.cpp
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=51653&r1=51652&r2=51653&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Wed Oct 26 10:59:53 2011
@@ -88,6 +88,8 @@
* Fixed: Compilation with boost 1.47 (bug #18399's patch).
* Fixed: Compilation with the clang 2.9 compiler (bug #18399's patch).
* Fixed: Avoid copying of singular iterators in the whiteboard code.
+ * Fixed a problem where version comparisons could cease to work until
+ Wesnoth was restarted (bug #18766)
Version 1.9.9:
* AI:
Modified: trunk/src/version.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/version.cpp?rev=51653&r1=51652&r2=51653&view=diff
==============================================================================
--- trunk/src/version.cpp (original)
+++ trunk/src/version.cpp Wed Oct 26 10:59:53 2011
@@ -173,11 +173,6 @@
LT, GT
};
- namespace {
- static const size_t max_recursions = 256;
- static size_t level = 0;
- }
-
/*
x > y
x0.x1.x2.x3.[...].xN > y0.y1.y2.y3.[...].yN iff
@@ -188,7 +183,7 @@
template<typename _Toperator, typename _Tfallback_operator>
bool recursive_order_operation(const std::vector<unsigned int>& l,
const std::vector<unsigned int>& r, size_t k)
{
- if(k >= l.size() || k >= r.size() || ++level > max_recursions) {
+ if(k >= l.size() || k >= r.size()) {
return false;
}
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits