Skip to content

Commit

Permalink
xrEngine/LightAnimLibrary: use xr_string instead of shared_str
Browse files Browse the repository at this point in the history
  • Loading branch information
Xottab-DUTY committed Mar 4, 2018
1 parent 4fa498a commit 2b3140e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/editors/LevelEditor/EditLightAnim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

#include "EditLightAnim.h"
#include "Scene.h"
#include "LightAnimLibrary.h"
#include "xrEngine/LightAnimLibrary.h"
#include "editors/ECore/Editor/ColorPicker.h"
#include "editors/ECore/Editor/ui_main.h"
//---------------------------------------------------------------------------
Expand Down Expand Up @@ -162,7 +162,7 @@ void TfrmEditLightAnim::InitItems()
{
ListItemsVec items;
for (LAItemIt it = LALib.Items.begin(); it != LALib.Items.end(); it++)
LHelper().CreateItem(items, *(*it)->cName, 0, 0, 0);
LHelper().CreateItem(items, (*it)->cName.c_str(), 0, 0, 0);
m_Items->AssignItems(items, false, true);
}

Expand Down Expand Up @@ -255,7 +255,7 @@ void __fastcall TfrmEditLightAnim::ebAddAnimClick(TObject* Sender)
pref.c_str(), 2, fastdelegate::bind<TFindObjectByName>(this, &TfrmEditLightAnim::FindItemByName), false, true);
CLAItem* I = LALib.AppendItem(name.c_str(), 0);
InitItems();
m_Items->SelectItem(*I->cName, true, false, true);
m_Items->SelectItem(I->cName.c_str(), true, false, true);
OnModified();
}

Expand All @@ -271,7 +271,7 @@ void __fastcall TfrmEditLightAnim::ebCloneClick(TObject* Sender)
fastdelegate::bind<TFindObjectByName>(this, &TfrmEditLightAnim::FindItemByName), false, true);
CLAItem* I = LALib.AppendItem(name.c_str(), m_CurrentItem);
InitItems();
m_Items->SelectItem(*I->cName, true, false, true);
m_Items->SelectItem(I->cName.c_str(), true, false, true);
OnModified();
}
else
Expand Down
2 changes: 1 addition & 1 deletion src/xrEngine/LightAnimLibrary.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ LAItemIt ELightAnimLibrary::FindItemI(LPCSTR name)
{
if (name && name[0])
for (LAItemIt it = Items.begin(); it != Items.end(); it++)
if (0 == xr_strcmp((*it)->cName, name))
if (0 == xr_strcmp((*it)->cName.c_str(), name))
return it;
return Items.end();
}
Expand Down
2 changes: 1 addition & 1 deletion src/xrEngine/LightAnimLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class ENGINE_API CLAItem
{
public:
shared_str cName;
xr_string cName;
float fFPS;
using KeyMap = xr_map<int, u32>;
KeyMap Keys;
Expand Down

0 comments on commit 2b3140e

Please sign in to comment.