Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-04-17 07:17:24 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-04-17 07:21:24 +0300
commite12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch)
tree8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/collada/ExtraTags.cpp
parentb3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (diff)
ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
Diffstat (limited to 'source/blender/collada/ExtraTags.cpp')
-rw-r--r--source/blender/collada/ExtraTags.cpp95
1 files changed, 47 insertions, 48 deletions
diff --git a/source/blender/collada/ExtraTags.cpp b/source/blender/collada/ExtraTags.cpp
index 829bb40b1f5..4da0725f380 100644
--- a/source/blender/collada/ExtraTags.cpp
+++ b/source/blender/collada/ExtraTags.cpp
@@ -28,8 +28,8 @@
ExtraTags::ExtraTags(std::string profile)
{
- this->profile = profile;
- this->tags = std::map<std::string, std::string>();
+ this->profile = profile;
+ this->tags = std::map<std::string, std::string>();
}
ExtraTags::~ExtraTags()
@@ -38,86 +38,85 @@ ExtraTags::~ExtraTags()
bool ExtraTags::isProfile(std::string profile)
{
- return this->profile == profile;
+ return this->profile == profile;
}
-bool ExtraTags::addTag(std::string tag, std::string data)
+bool ExtraTags::addTag(std::string tag, std::string data)
{
- tags[tag] = data;
+ tags[tag] = data;
- return true;
+ return true;
}
int ExtraTags::asInt(std::string tag, bool *ok)
{
- if (tags.find(tag) == tags.end()) {
- *ok = false;
- return -1;
- }
- *ok = true;
- return atoi(tags[tag].c_str());
+ if (tags.find(tag) == tags.end()) {
+ *ok = false;
+ return -1;
+ }
+ *ok = true;
+ return atoi(tags[tag].c_str());
}
float ExtraTags::asFloat(std::string tag, bool *ok)
{
- if (tags.find(tag) == tags.end()) {
- *ok = false;
- return -1.0f;
- }
- *ok = true;
- return (float)atof(tags[tag].c_str());
+ if (tags.find(tag) == tags.end()) {
+ *ok = false;
+ return -1.0f;
+ }
+ *ok = true;
+ return (float)atof(tags[tag].c_str());
}
std::string ExtraTags::asString(std::string tag, bool *ok)
{
- if (tags.find(tag) == tags.end()) {
- *ok = false;
- return "";
- }
- *ok = true;
- return tags[tag];
+ if (tags.find(tag) == tags.end()) {
+ *ok = false;
+ return "";
+ }
+ *ok = true;
+ return tags[tag];
}
-
bool ExtraTags::setData(std::string tag, short *data)
{
- bool ok = false;
- int tmp = asInt(tag, &ok);
- if (ok)
- *data = (short)tmp;
- return ok;
+ bool ok = false;
+ int tmp = asInt(tag, &ok);
+ if (ok)
+ *data = (short)tmp;
+ return ok;
}
bool ExtraTags::setData(std::string tag, int *data)
{
- bool ok = false;
- int tmp = asInt(tag, &ok);
- if (ok)
- *data = tmp;
- return ok;
+ bool ok = false;
+ int tmp = asInt(tag, &ok);
+ if (ok)
+ *data = tmp;
+ return ok;
}
bool ExtraTags::setData(std::string tag, float *data)
{
- bool ok = false;
- float tmp = asFloat(tag, &ok);
- if (ok)
- *data = tmp;
- return ok;
+ bool ok = false;
+ float tmp = asFloat(tag, &ok);
+ if (ok)
+ *data = tmp;
+ return ok;
}
bool ExtraTags::setData(std::string tag, char *data)
{
- bool ok = false;
- int tmp = asInt(tag, &ok);
- if (ok)
- *data = (char)tmp;
- return ok;
+ bool ok = false;
+ int tmp = asInt(tag, &ok);
+ if (ok)
+ *data = (char)tmp;
+ return ok;
}
std::string ExtraTags::setData(std::string tag, std::string &data)
{
- bool ok = false;
- std::string tmp = asString(tag, &ok);
- return (ok) ? tmp : data;
+ bool ok = false;
+ std::string tmp = asString(tag, &ok);
+ return (ok) ? tmp : data;
}