From f6b0561cd86f363c93b64817f26e3ed7f5b1b688 Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 21 Aug 2011 18:57:45 +0000 Subject: (svn r22805) -Codechange: move use of magic number for version checking to more logical location --- src/rev.cpp.in | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/rev.cpp.in') diff --git a/src/rev.cpp.in b/src/rev.cpp.in index 6eb90dc4a..3ce64b6de 100644 --- a/src/rev.cpp.in +++ b/src/rev.cpp.in @@ -10,8 +10,18 @@ /** @file rev.cpp Autogenerated file with the revision and such of OpenTTD. */ #include "stdafx.h" +#include "core/bitmath_func.hpp" #include "rev.h" +/** + * Is this version of OpenTTD a release version? + * @return True if it is a release version. + */ +bool IsReleasedVersion() +{ + return HasBit(_openttd_newgrf_version, 19); +} + /** * The text version of OpenTTD's revision. * This will be either "..[-RC]", -- cgit v1.2.3-54-g00ecf