diff options
author | rubidium <rubidium@openttd.org> | 2008-04-16 20:39:35 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-04-16 20:39:35 +0000 |
commit | 34f4150b158a54347cdd1f3dafa5f5010ed7709a (patch) | |
tree | c1fbfd77158a37afac455f1faf6ff92cd2d0e530 /src/misc | |
parent | 1eac80f840256f52cd482dd4c62fccd362bcfeba (diff) | |
download | openttd-34f4150b158a54347cdd1f3dafa5f5010ed7709a.tar.xz |
(svn r12740) -Codechange: use a vector instead of allocating memory in a byte array for ChildScreenSpriteToDraw.
Diffstat (limited to 'src/misc')
-rw-r--r-- | src/misc/smallvec.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/misc/smallvec.h b/src/misc/smallvec.h index 29870e1e9..35e90be97 100644 --- a/src/misc/smallvec.h +++ b/src/misc/smallvec.h @@ -49,6 +49,16 @@ template <typename T, uint S> struct SmallVector { { return &data[items]; } + + const T *Get(size_t index) const + { + return &data[index]; + } + + T *Get(size_t index) + { + return &data[index]; + } }; #endif /* SMALLVEC_H */ |