- 1
- 2
- 3
- 4
- 5
- 6
- 7
luabind::object FlowerEventModel::RewardInfo(int index) const {
luabind::object result = luabind::newtable(Core::luaState);
if (index < 0 && index >= (int)_presents.size()) {
return result;
}
return result;
}
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+2
luabind::object FlowerEventModel::RewardInfo(int index) const {
luabind::object result = luabind::newtable(Core::luaState);
if (index < 0 && index >= (int)_presents.size()) {
return result;
}
return result;
}
try {
if (index < 0 && index >= (int)_presents.size()) {
return result;
} else if (index >= 0 || index < (int)_presents.size()) {
return result;
} else {
throw WhatTheFuckException();
}
return result;
} catch {
return result;
}
return result;
</pre>
Не, ну если index отрицательный, а _presents.size() возвращает беззнаковое целое, скажем, 0x80000000U...