mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
create a specific esm reader function for RefID to avoid allocation for string and then again for RefId
Fixed some types removed useless header applied clang format fixed compile tests fixed clang tidy, and closer to logic before this MR Removed hardcoded refids unless there is a returned value we don't use static RefIds can use == between RefId and hardcoded string Fix clang format Fixed a few instances where std::string was used, when only const std::string& was needed removed unused variable
This commit is contained in:
parent
874ff88288
commit
65cdd489fb
194 changed files with 814 additions and 700 deletions
|
@ -1,10 +1,10 @@
|
|||
#ifndef INTERPRETER_CONTEXT_H_INCLUDED
|
||||
#define INTERPRETER_CONTEXT_H_INCLUDED
|
||||
|
||||
#include <components/esm/refid.hpp>
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
#include <vector>
|
||||
#include <components/esm/refid.hpp>
|
||||
|
||||
namespace Interpreter
|
||||
{
|
||||
|
|
|
@ -213,11 +213,8 @@ namespace Interpreter
|
|||
/* if list of globals is empty, grab it and sort it by descending string length */
|
||||
if (globals.empty())
|
||||
{
|
||||
auto globalIds = context.getGlobals();
|
||||
for (auto id : globalIds)
|
||||
{
|
||||
globals.push_back(id);
|
||||
}
|
||||
globals = context.getGlobals();
|
||||
;
|
||||
sort(globals.begin(), globals.end(), longerStr);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue