summaryrefslogtreecommitdiff
path: root/src/misc/blob.hpp
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-07-24 10:14:39 +0000
committeralberth <alberth@openttd.org>2010-07-24 10:14:39 +0000
commitbe6c0584240caf420b2475a0be036391e842e8af (patch)
tree6111751cf5526e1eb41176782d84766c4e9ed185 /src/misc/blob.hpp
parent645b6ce77345867fa96861843197481131566c46 (diff)
downloadopenttd-be6c0584240caf420b2475a0be036391e842e8af.tar.xz
(svn r20211) -Codechange: Indented code should have curly braces around it.
Diffstat (limited to 'src/misc/blob.hpp')
-rw-r--r--src/misc/blob.hpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/misc/blob.hpp b/src/misc/blob.hpp
index ed75ca5ab..d77a1b9d8 100644
--- a/src/misc/blob.hpp
+++ b/src/misc/blob.hpp
@@ -263,12 +263,14 @@ public:
tmp->capacity = new_size - (header_size + tail_reserve);
/* copy existing data */
- if (tmp->items != 0)
+ if (tmp->items != 0) {
memcpy(tmp + 1, data, tmp->items);
+ }
/* replace our block with new one */
- if (Capacity() > 0)
+ if (Capacity() > 0) {
RawFree(&Hdr());
+ }
Init(tmp);
}