Skip to content

Commit

Permalink
Revert "Refactor a bit xr_token"
Browse files Browse the repository at this point in the history
This reverts commit 2039fc6.
  • Loading branch information
Xottab-DUTY committed Nov 15, 2017
1 parent 9c218b4 commit 028188f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/xrCommon/xr_string.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "xalloc.h"

// string(char)
using xr_string = std::basic_string<char, std::char_traits<char>, xalloc<char>>;
typedef std::basic_string<char, std::char_traits<char>, xalloc<char>> xr_string;

inline void xr_strlwr(xr_string& src)
{
Expand Down
11 changes: 4 additions & 7 deletions src/xrCore/xrCore.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,20 +96,17 @@
// stl ext
struct XRCORE_API xr_rtoken
{
xr_string name;
shared_str name;
int id;

xr_rtoken(const pcstr _nm, const int _id)
xr_rtoken(pcstr _nm, int _id)
{
name = _nm;
id = _id;
}

void rename(const pcstr _nm) { name = _nm; }
bool equal(const pcstr _nm) const
{
return name.compare(_nm) == 0;
}
void rename(pcstr _nm) { name = _nm; }
bool equal(pcstr _nm) const { return (0 == xr_strcmp(*name, _nm)); }
};

#pragma pack(push, 1)
Expand Down

0 comments on commit 028188f

Please sign in to comment.