[commit] r1575 - trunk/GME/Core
GMESRC Repository Notifications
gme-commit at list.isis.vanderbilt.edu
Mon Oct 3 16:05:23 CDT 2011
Author: ksmyth
Date: Mon Oct 3 16:05:23 2011
New Revision: 1575
Log:
Store UNICODE to avoid conversions
Modified:
trunk/GME/Core/CoreMetaAttribute.cpp
trunk/GME/Core/CoreMetaAttribute.h
trunk/GME/Core/CoreMetaObject.cpp
Modified: trunk/GME/Core/CoreMetaAttribute.cpp
==============================================================================
--- trunk/GME/Core/CoreMetaAttribute.cpp Mon Oct 3 16:05:11 2011 (r1574)
+++ trunk/GME/Core/CoreMetaAttribute.cpp Mon Oct 3 16:05:23 2011 (r1575)
@@ -34,7 +34,9 @@
{
CHECK_OUT(p);
- CopyTo(token, p);
+ *p = SysAllocString(token.c_str());
+ if (*p == NULL)
+ return E_OUTOFMEMORY;
return S_OK;
}
@@ -42,7 +44,9 @@
{
CHECK_OUT(p);
- CopyTo(name, p);
+ *p = SysAllocString(name.c_str());
+ if (*p == NULL)
+ return E_OUTOFMEMORY;
return S_OK;
}
Modified: trunk/GME/Core/CoreMetaAttribute.h
==============================================================================
--- trunk/GME/Core/CoreMetaAttribute.h Mon Oct 3 16:05:11 2011 (r1574)
+++ trunk/GME/Core/CoreMetaAttribute.h Mon Oct 3 16:05:23 2011 (r1575)
@@ -37,8 +37,8 @@
public:
CCoreMetaObject *object;
attrid_type attrid;
- std::string token;
- std::string name;
+ std::wstring token;
+ std::wstring name;
valtype_type valtype;
// ------- Methods
Modified: trunk/GME/Core/CoreMetaObject.cpp
==============================================================================
--- trunk/GME/Core/CoreMetaObject.cpp Mon Oct 3 16:05:11 2011 (r1574)
+++ trunk/GME/Core/CoreMetaObject.cpp Mon Oct 3 16:05:23 2011 (r1575)
@@ -120,8 +120,8 @@
q->object = this;
q->attrid = attrid;
- CopyTo(token, q->token);
- CopyTo(name, q->name);
+ q->token = token;
+ q->name = name;
q->valtype = valtype;
attributes.push_front(q);
More information about the gme-commit
mailing list