diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:17:24 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-17 07:21:24 +0300 |
commit | e12c08e8d170b7ca40f204a5b0423c23a9fbc2c1 (patch) | |
tree | 8cf3453d12edb177a218ef8009357518ec6cab6a /source/blender/collada/ExtraHandler.cpp | |
parent | b3dabc200a4b0399ec6b81f2ff2730d07b44fcaa (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/ExtraHandler.cpp')
-rw-r--r-- | source/blender/collada/ExtraHandler.cpp | 75 |
1 files changed, 37 insertions, 38 deletions
diff --git a/source/blender/collada/ExtraHandler.cpp b/source/blender/collada/ExtraHandler.cpp index 48586a2b169..5aed0050a06 100644 --- a/source/blender/collada/ExtraHandler.cpp +++ b/source/blender/collada/ExtraHandler.cpp @@ -25,64 +25,63 @@ ExtraHandler::ExtraHandler(DocumentImporter *dimp, AnimationImporter *aimp) : currentExtraTags(0) { - this->dimp = dimp; - this->aimp = aimp; + this->dimp = dimp; + this->aimp = aimp; } -ExtraHandler::~ExtraHandler() { +ExtraHandler::~ExtraHandler() +{ } bool ExtraHandler::elementBegin(const char *elementName, const char **attributes) { - // \todo attribute handling for profile tags - currentElement = std::string(elementName); - //addToSidTree(attributes[0], attributes[1]); - return true; + // \todo attribute handling for profile tags + currentElement = std::string(elementName); + //addToSidTree(attributes[0], attributes[1]); + return true; } bool ExtraHandler::elementEnd(const char *elementName) { - return true; + return true; } bool ExtraHandler::textData(const char *text, size_t textLength) { - char buf[1024]; + char buf[1024]; - if (currentElement.length() == 0 || currentExtraTags == 0) return false; + if (currentElement.length() == 0 || currentExtraTags == 0) + return false; - BLI_strncpy(buf, text, textLength + 1); - currentExtraTags->addTag(currentElement, std::string(buf)); - return true; + BLI_strncpy(buf, text, textLength + 1); + currentExtraTags->addTag(currentElement, std::string(buf)); + return true; } -bool ExtraHandler::parseElement( - const char *profileName, - const unsigned long& elementHash, - const COLLADAFW::UniqueId& uniqueId) +bool ExtraHandler::parseElement(const char *profileName, + const unsigned long &elementHash, + const COLLADAFW::UniqueId &uniqueId) { - /* implement for backwards compatibility, new version added object parameter */ - return parseElement(profileName, elementHash, uniqueId, NULL); + /* implement for backwards compatibility, new version added object parameter */ + return parseElement(profileName, elementHash, uniqueId, NULL); } -bool ExtraHandler::parseElement( - const char *profileName, - const unsigned long& elementHash, - const COLLADAFW::UniqueId& uniqueId, - COLLADAFW::Object* object) +bool ExtraHandler::parseElement(const char *profileName, + const unsigned long &elementHash, + const COLLADAFW::UniqueId &uniqueId, + COLLADAFW::Object *object) { - if (BLI_strcaseeq(profileName, "blender")) { - //printf("In parseElement for supported profile %s for id %s\n", profileName, uniqueId.toAscii().c_str()); - currentUid = uniqueId; - ExtraTags *et = dimp->getExtraTags(uniqueId); - if (!et) { - et = new ExtraTags(std::string(profileName)); - dimp->addExtraTags(uniqueId, et); - - } - currentExtraTags = et; - return true; - } - //printf("In parseElement for unsupported profile %s for id %s\n", profileName, uniqueId.toAscii().c_str()); - return false; + if (BLI_strcaseeq(profileName, "blender")) { + //printf("In parseElement for supported profile %s for id %s\n", profileName, uniqueId.toAscii().c_str()); + currentUid = uniqueId; + ExtraTags *et = dimp->getExtraTags(uniqueId); + if (!et) { + et = new ExtraTags(std::string(profileName)); + dimp->addExtraTags(uniqueId, et); + } + currentExtraTags = et; + return true; + } + //printf("In parseElement for unsupported profile %s for id %s\n", profileName, uniqueId.toAscii().c_str()); + return false; } |