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 | 4703eb20368acdebc3481dcb8397bcc0c466da67 (patch) | |
tree | c1fbfd77158a37afac455f1faf6ff92cd2d0e530 /src/misc | |
parent | 5254131d9c9178e1afb708cec13f6fa0350fdde7 (diff) | |
download | openttd-4703eb20368acdebc3481dcb8397bcc0c466da67.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 */ |