fix broken edit score reading. Unsigned ints were loaded from XML incorrectly.

This commit is contained in:
Chris Danford
2005-06-14 20:11:13 +00:00
parent acb02d206d
commit 2ff715bd4f
2 changed files with 8 additions and 4 deletions
+6 -2
View File
@@ -151,7 +151,9 @@ void StepsID::FromSteps( const Steps *p )
{
sDescription = p->GetDescription();
uHash = p->GetHash();
} else {
}
else
{
sDescription = "";
uHash = 0;
}
@@ -242,7 +244,9 @@ void StepsID::LoadFromNode( const XNode* pNode )
{
pNode->GetAttrValue("Description", sDescription);
pNode->GetAttrValue("Hash", uHash);
} else {
}
else
{
sDescription = "";
uHash = 0;
}
+2 -2
View File
@@ -625,14 +625,14 @@ void XNode::GetValue(CString &out) const { out = m_sValue; }
void XNode::GetValue(int &out) const { out = atoi(m_sValue); }
void XNode::GetValue(float &out) const { out = strtof(m_sValue, NULL); }
void XNode::GetValue(bool &out) const { out = atoi(m_sValue) != 0; }
void XNode::GetValue(unsigned &out) const { out = (unsigned)atoi(m_sValue) != 0; }
void XNode::GetValue(unsigned &out) const { out = (unsigned)atoi(m_sValue); }
void XNode::GetValue(DateTime &out) const { out.FromString( m_sValue ); }
void XAttr::GetValue(CString &out) const { out = m_sValue; }
void XAttr::GetValue(int &out) const { out = atoi(m_sValue); }
void XAttr::GetValue(float &out) const { out = strtof(m_sValue, NULL); }
void XAttr::GetValue(bool &out) const { out = atoi(m_sValue) != 0; }
void XAttr::GetValue(unsigned &out) const { out = (unsigned)atoi(m_sValue) != 0; }
void XAttr::GetValue(unsigned &out) const { out = (unsigned)atoi(m_sValue); }
void XAttr::GetValue(DateTime &out) const { out.FromString( m_sValue ); }
//========================================================