~ubuntu-branches/ubuntu/trusty/manaplus/trusty

« back to all changes in this revision

Viewing changes to src/spellmanager.cpp

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2013-10-07 10:26:14 UTC
  • mfrom: (1.1.11)
  • Revision ID: package-import@ubuntu.com-20131007102614-tg2zjdz8vmtl6n7i
Tags: 1.3.9.29-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
55
55
    if (spellId < 0 || static_cast<unsigned int>(spellId) >= mSpells.size())
56
56
        return nullptr;
57
57
 
58
 
    std::map<unsigned int, TextCommand*>::const_iterator
 
58
    const std::map<unsigned int, TextCommand*>::const_iterator
59
59
        it = mSpells.find(spellId);
60
60
 
61
61
    return it != mSpells.end() ? (*it).second : nullptr;
404
404
    mSpells[id2] = spell1;
405
405
 
406
406
    // swap id
407
 
    int tmp = spell1->getId();
 
407
    const int tmp = spell1->getId();
408
408
    spell1->setId(spell2->getId());
409
409
    spell2->setId(tmp);
410
410