Fixed ComponentWrapper string scope error
This commit is contained in:
@@ -37,13 +37,13 @@ struct ComponentWrapper
|
|||||||
{
|
{
|
||||||
friend struct ComponentWrapper;
|
friend struct ComponentWrapper;
|
||||||
private:
|
private:
|
||||||
SubscriptProxy(ComponentWrapper* component, std::string& propertyName)
|
SubscriptProxy(ComponentWrapper* component, std::string propertyName)
|
||||||
: m_Component(component)
|
: m_Component(component)
|
||||||
, m_PropertyName(propertyName)
|
, m_PropertyName(propertyName)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
ComponentWrapper* m_Component;
|
ComponentWrapper* m_Component;
|
||||||
std::string& m_PropertyName;
|
std::string m_PropertyName;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
template <typename T>
|
template <typename T>
|
||||||
|
|||||||
@@ -22,8 +22,7 @@ BOOST_AUTO_TEST_CASE(ComponentPoolTest)
|
|||||||
int i = 0;
|
int i = 0;
|
||||||
for (auto& c : pool) {
|
for (auto& c : pool) {
|
||||||
BOOST_CHECK(c.EntityID == i);
|
BOOST_CHECK(c.EntityID == i);
|
||||||
int field = c.Property<int>("Field");
|
BOOST_CHECK((int)c["Field"] == i);
|
||||||
BOOST_CHECK(field == i);
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user