Enforced const_interator returns on const_iterator return types in Inventory and ItemInst

This commit is contained in:
Uleat
2015-02-06 07:57:15 -05:00
parent b96e5a7f4d
commit 2bf2485b4c
7 changed files with 38 additions and 35 deletions
+1 -1
View File
@@ -2618,7 +2618,7 @@ void command_peekinv(Client *c, const Seperator *sep)
}
else {
int cursorDepth = 0;
for (auto it = targetClient->GetInv().cursor_begin(); (it != targetClient->GetInv().cursor_end()); ++it, ++cursorDepth) {
for (auto it = targetClient->GetInv().cursor_cbegin(); (it != targetClient->GetInv().cursor_cend()); ++it, ++cursorDepth) {
inst_main = *it;
item_data = (inst_main == nullptr) ? nullptr : inst_main->GetItem();
linker.SetItemInst(inst_main);