summaryrefslogtreecommitdiff
path: root/src/scripting/lua.cpp
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-10-19 22:56:32 +0200
committerThorbjørn Lindeijer <thorbjorn@lindeijer.nl>2011-10-20 23:10:40 +0200
commit4e49081ca1f0d658308582ef3084837bb58c33ec (patch)
tree85ab83e760a3bd017a1ef1ab2054eef049aa0f8e /src/scripting/lua.cpp
parent03ff7c110e536de1f8b239817e50cb07c492da6f (diff)
downloadmanaserv-4e49081ca1f0d658308582ef3084837bb58c33ec.tar.gz
manaserv-4e49081ca1f0d658308582ef3084837bb58c33ec.tar.bz2
manaserv-4e49081ca1f0d658308582ef3084837bb58c33ec.tar.xz
manaserv-4e49081ca1f0d658308582ef3084837bb58c33ec.zip
Return a const & from NameMap to avoid potential deep copies
When I introduced NameMap it was only used with pointers, but now it is also used with std::string so it probably makes sense to keep a default- constructed value around so that a reference can be returned rather than a copy. NameMap::find was renamed to NameMap::value to make it more clear that it doesn't return an iterator, like std::map::find. Reviewed-by: Yohann Ferreira Reviewed-by: Ben Longbons
Diffstat (limited to 'src/scripting/lua.cpp')
0 files changed, 0 insertions, 0 deletions