mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-07-20 19:44:05 +00:00
case-handling fix for references in cells
This commit is contained in:
parent
5fb3dc854b
commit
a6e83f5b9b
1 changed files with 9 additions and 1 deletions
|
@ -17,6 +17,7 @@
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
namespace ESMS
|
namespace ESMS
|
||||||
{
|
{
|
||||||
|
@ -187,8 +188,15 @@ namespace ESMS
|
||||||
// Get each reference in turn
|
// Get each reference in turn
|
||||||
while(cell->getNextRef(esm, ref))
|
while(cell->getNextRef(esm, ref))
|
||||||
{
|
{
|
||||||
|
std::string lowerCase;
|
||||||
|
|
||||||
|
std::transform (ref.refID.begin(), ref.refID.end(), std::back_inserter (lowerCase),
|
||||||
|
(int(*)(int)) std::tolower);
|
||||||
|
|
||||||
int rec = store.find(ref.refID);
|
int rec = store.find(ref.refID);
|
||||||
|
|
||||||
|
ref.refID = lowerCase;
|
||||||
|
|
||||||
/* We can optimize this further by storing the pointer to the
|
/* We can optimize this further by storing the pointer to the
|
||||||
record itself in store.all, so that we don't need to look it
|
record itself in store.all, so that we don't need to look it
|
||||||
up again here. However, never optimize. There are infinite
|
up again here. However, never optimize. There are infinite
|
||||||
|
|
Loading…
Reference in a new issue