Return value can't be nullptr. Pointer complicates the code because has to be
dereferenced.
Also move function definition to hpp to make it easier for compiler to optimize
calls.
1. Changed mIndex to unsigned, to solve potential implementation defined behavior with right shift.
2. Refactoring to minimize use of magic number -1 to indicate "no Content File".
The InsertFunctor for cells was calling localRotateObject() for all references which set the mChanged flag in RefData to true.
Also clean up RefData interface slightly.
Functions compiled as taking a class can't be linked with functions giving a struct, because of the name mangling I'm guessing...
unresolved external symbol "protected: void __thiscall MWWorld::LiveCellRefBase::loadImp(class ESM::ObjectState const &)" (?loadImp@LiveCellRefBase@MWWorld@@IAEXABVObjectState@ESM@@@Z)