From 9e891700eb4f32e8c6dbcaa9dc1b3cc8ab22f667 Mon Sep 17 00:00:00 2001 From: skidd13 Date: Sat, 6 Mar 2010 18:31:16 +0100 Subject: [PATCH 8/9] -Codechange: Move static elements from ByteBlob to their own file --- projects/openttd_vs80.vcproj | 4 ++++ projects/openttd_vs90.vcproj | 4 ++++ source.list | 1 + src/misc/blob.cpp | 16 ++++++++++++++++ src/misc/dbg_helpers.cpp | 3 --- 5 files changed, 25 insertions(+), 3 deletions(-) create mode 100644 src/misc/blob.cpp diff --git a/projects/openttd_vs80.vcproj b/projects/openttd_vs80.vcproj index 5971688..8677506 100644 --- a/projects/openttd_vs80.vcproj +++ b/projects/openttd_vs80.vcproj @@ -3352,6 +3352,10 @@ > + + diff --git a/projects/openttd_vs90.vcproj b/projects/openttd_vs90.vcproj index 1454737..3e8a4ef 100644 --- a/projects/openttd_vs90.vcproj +++ b/projects/openttd_vs90.vcproj @@ -3349,6 +3349,10 @@ > + + diff --git a/source.list b/source.list index ea94146..d7b758a 100644 --- a/source.list +++ b/source.list @@ -788,6 +788,7 @@ water_map.h # Misc misc/array.hpp misc/binaryheap.hpp +misc/blob.cpp misc/blob.hpp misc/countedobj.cpp misc/countedptr.hpp diff --git a/src/misc/blob.cpp b/src/misc/blob.cpp new file mode 100644 index 0000000..19d5c0b --- /dev/null +++ b/src/misc/blob.cpp @@ -0,0 +1,16 @@ +/* $Id$ */ + +/* + * This file is part of OpenTTD. + * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2. + * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. + * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see . + */ + +/** @file dbg_helpers.cpp Fast byte based dynamic array. */ + +#include "../stdafx.h" +#include "blob.hpp" + +/** Just to silence an unsilencable GCC 4.4+ warning */ +/* static */ ByteBlob::BlobHeader ByteBlob::hdrEmpty[] = {{0, 0}, {0, 0}}; diff --git a/src/misc/dbg_helpers.cpp b/src/misc/dbg_helpers.cpp index d20c38e..eb80045 100644 --- a/src/misc/dbg_helpers.cpp +++ b/src/misc/dbg_helpers.cpp @@ -175,6 +175,3 @@ void DumpTarget::EndStruct() /* remove current struct name from the stack */ m_cur_struct.pop(); } - -/** Just to silence an unsilencable GCC 4.4+ warning */ -/* static */ ByteBlob::BlobHeader ByteBlob::hdrEmpty[] = {{0, 0}, {0, 0}}; -- 1.6.6.1