diff options
author | Stijn Buys <ingar@osirion.org> | 2010-03-13 13:03:33 +0000 |
---|---|---|
committer | Stijn Buys <ingar@osirion.org> | 2010-03-13 13:03:33 +0000 |
commit | f612f19e095b8d0ba49f5bcdec6a582824315d69 (patch) | |
tree | aa94da4a14254365ead88219726dcc0f3b2c4928 /src/game/base/shipmodel.cc | |
parent | b16f437accb2db2effde95d7c6afa7dc5dd70bf6 (diff) |
small OS X build fixes
ShipModel::search cleanup
Diffstat (limited to 'src/game/base/shipmodel.cc')
-rw-r--r-- | src/game/base/shipmodel.cc | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/game/base/shipmodel.cc b/src/game/base/shipmodel.cc index a6a2bf9..ed8f09d 100644 --- a/src/game/base/shipmodel.cc +++ b/src/game/base/shipmodel.cc @@ -67,11 +67,19 @@ void ShipModel::generate_info() ShipModel *ShipModel::find(const std::string & label) { + if (!label.size()) { + return 0; + } + return (ShipModel *) core::Info::find(shipmodel_infotype, label); } -ShipModel *ShipModel::search(const std::string searchstr) +ShipModel *ShipModel::search(const std::string & searchstr) { + if (!searchstr.size()) { + return 0; + } + return (ShipModel *) core::Info::search(shipmodel_infotype, searchstr); } |