Simplifications. Concurrency fixes. Make "non binary" fields (like 'id') work.

This commit is contained in:
JoelKatz
2012-10-05 02:30:54 -07:00
parent a18014ad16
commit fb61337175
2 changed files with 11 additions and 10 deletions

View File

@@ -31,7 +31,7 @@ SField::ref SField::getField(int code)
int type = code >> 16;
int field = code % 0xffff;
if ((type <= 0) || (type >= 256) || (field <= 0) || (field >= 256))
if ((type <= 0) || (field <= 0))
return sfInvalid;
boost::mutex::scoped_lock sl(mapMutex);
@@ -72,11 +72,6 @@ int SField::compare(SField::ref f1, SField::ref f2)
return 0;
}
SField::ref SField::getField(int type, int value)
{
return getField(FIELD_CODE(type, value));
}
std::string SField::getName() const
{
if (!fieldName.empty())