Changeset 955 for cpp/frams/vm/classes/genoobj.cpp
- Timestamp:
- 06/25/20 00:34:29 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/vm/classes/genoobj.cpp
r732 r955 86 86 void GenoObj::get_format(ExtValue *ret) 87 87 { 88 char format_as_string[2] = { getFormat(), 0 }; 89 ret->setString(format_as_string); 88 ret->setString(getFormat()); 90 89 } 91 90 … … 101 100 } 102 101 103 charGenoObj::formatFromExtValue(ExtValue& v)102 SString GenoObj::formatFromExtValue(ExtValue& v) 104 103 { 105 104 if (v.getType() == TInt) 106 return v.getInt(); 105 { 106 char ch = v.getInt(); 107 return SString(&ch,1); 108 } 107 109 if (v.getType() == TString) 108 110 { 109 SString s = v.getString(); 110 if (s.len() == 1) 111 return s.charAt(0); 111 return v.getString(); 112 112 } 113 113 return Geno::INVALID_FORMAT; … … 198 198 SString n = vec->get(1) ? vec->get(1)->getString() : SString::empty(); 199 199 SString c = vec->get(2) ? vec->get(2)->getString() : SString::empty(); 200 *ret = makeDynamicObjectAndDecRef(new Geno(g, -1, n, c));200 *ret = makeDynamicObjectAndDecRef(new Geno(g, Geno::UNKNOWN_FORMAT, n, c)); 201 201 } 202 202 else
Note: See TracChangeset
for help on using the changeset viewer.