Changeset View
Changeset View
Standalone View
Standalone View
source/blender/io/collada/ExtraTags.cpp
| Show First 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | bool ExtraTags::setData(std::string tag, char *data) | ||||
| bool ok = false; | bool ok = false; | ||||
| int tmp = asInt(tag, &ok); | int tmp = asInt(tag, &ok); | ||||
| if (ok) { | if (ok) { | ||||
| *data = (char)tmp; | *data = (char)tmp; | ||||
| } | } | ||||
| return ok; | return ok; | ||||
| } | } | ||||
| bool ExtraTags::setData(std::string tag, bool *data) { | |||||
| bool ok = false; | |||||
| int tmp = asInt(tag, &ok); | |||||
| if (ok) { | |||||
| *data = (bool)tmp; | |||||
| } | |||||
| return ok; | |||||
| } | |||||
| std::string ExtraTags::setData(std::string tag, std::string &data) | std::string ExtraTags::setData(std::string tag, std::string &data) | ||||
| { | { | ||||
| bool ok = false; | bool ok = false; | ||||
| std::string tmp = asString(tag, &ok); | std::string tmp = asString(tag, &ok); | ||||
| return (ok) ? tmp : data; | return (ok) ? tmp : data; | ||||
| } | } | ||||