Use std::string instead of ucstring

--HG--
branch : target_sheet
This commit is contained in:
Guillaume Dupuy 2016-12-04 13:37:04 +01:00
parent 6bfb1fb588
commit e82cb174e0
3 changed files with 4 additions and 4 deletions

View file

@ -1953,12 +1953,12 @@ CEntityCL *CEntityManager::getEntityByCompressedIndex(TDataSetIndex compressedIn
// getEntityBySheetName : // getEntityBySheetName :
// Return an entity based on its sheet name // Return an entity based on its sheet name
//----------------------------------------------- //-----------------------------------------------
CEntityCL *CEntityManager::getEntityBySheetName (const ucstring &sheet) const CEntityCL *CEntityManager::getEntityBySheetName (const std::string &sheet) const
{ {
if (!sheet.empty()) if (!sheet.empty())
{ {
uint i; uint i;
const CSheetId& sheetRef = NLMISC::CSheetId(sheet.toUtf8()); const CSheetId& sheetRef = NLMISC::CSheetId(sheet);
const uint count = (uint)_Entities.size(); const uint count = (uint)_Entities.size();
for (i=0; i<count; i++) for (i=0; i<count; i++)
{ {

View file

@ -277,7 +277,7 @@ public:
* \param complete : if true, the name must match the full name of the entity. * \param complete : if true, the name must match the full name of the entity.
*/ */
CEntityCL *getEntityByName (const ucstring &name, bool caseSensitive, bool complete) const; CEntityCL *getEntityByName (const ucstring &name, bool caseSensitive, bool complete) const;
CEntityCL *getEntityBySheetName (const ucstring &sheet) const; CEntityCL *getEntityBySheetName (const std::string &sheet) const;
/// Get an entity by dataset index. Returns NULL if the entity is not found. /// Get an entity by dataset index. Returns NULL if the entity is not found.
CEntityCL *getEntityByCompressedIndex(TDataSetIndex compressedIndex) const; CEntityCL *getEntityByCompressedIndex(TDataSetIndex compressedIndex) const;

View file

@ -2438,7 +2438,7 @@ class CAHTarget : public IActionHandler
if (entity == NULL) if (entity == NULL)
{ {
//Get the entity with a sheetName //Get the entity with a sheetName
entity = EntitiesMngr.getEntityBySheetName(entityName); entity = EntitiesMngr.getEntityBySheetName(entityName.toUtf8());
} }
if (entity) if (entity)