diff options
author | Shawn Willden <swillden@google.com> | 2020-11-20 00:31:53 -0700 |
---|---|---|
committer | Shawn Willden <swillden@google.com> | 2020-11-20 00:56:22 -0700 |
commit | 6ad5732fa5b77400a5682a5965e098849d91468d (patch) | |
tree | 29abd83e5d813094960c373b07cb01e4b90b5873 /src/cppbor_parse.cpp | |
parent | ad16ab54738553d09f9e7d62a4872491675e94bb (diff) | |
download | libcppbor-6ad5732fa5b77400a5682a5965e098849d91468d.tar.gz |
Apply clang-format.
Test: cppbor_test_external
Change-Id: If907312dc498a241f077de40745c5908fad6c15a
Diffstat (limited to 'src/cppbor_parse.cpp')
-rw-r--r-- | src/cppbor_parse.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/src/cppbor_parse.cpp b/src/cppbor_parse.cpp index 33d2ab6..4715152 100644 --- a/src/cppbor_parse.cpp +++ b/src/cppbor_parse.cpp @@ -19,10 +19,10 @@ #include <stack> #ifndef __TRUSTY__ - #include <android-base/logging.h> - #define LOG_TAG "CppBor" +#include <android-base/logging.h> +#define LOG_TAG "CppBor" #else - #define CHECK(x) (void)(x) +#define CHECK(x) (void)(x) #endif namespace cppbor { @@ -32,8 +32,8 @@ namespace { std::string insufficientLengthString(size_t bytesNeeded, size_t bytesAvail, const std::string& type) { char buf[1024]; - snprintf(buf, sizeof(buf), "Need %zu byte(s) for %s, have %zu", - bytesNeeded, type.c_str(), bytesAvail); + snprintf(buf, sizeof(buf), "Need %zu byte(s) for %s, have %zu", bytesNeeded, type.c_str(), + bytesAvail); return std::string(buf); } @@ -280,9 +280,9 @@ class FullParseClient : public ParseClient { // Starting a new compound data item, i.e. a new parent. Save it on the parent stack. // It's safe to save a raw pointer because the unique_ptr is guaranteed to stay in // existence until the corresponding itemEnd() call. - #if __has_feature(cxx_rtti) - assert(dynamic_cast<CompoundItem*>(item.get())); - #endif +#if __has_feature(cxx_rtti) + assert(dynamic_cast<CompoundItem*>(item.get())); +#endif mParentStack.push(static_cast<CompoundItem*>(item.get())); return this; } else { @@ -321,9 +321,9 @@ class FullParseClient : public ParseClient { private: void appendToLastParent(std::unique_ptr<Item> item) { auto parent = mParentStack.top(); - #if __has_feature(cxx_rtti) - assert(dynamic_cast<IncompleteItem*>(parent)); - #endif +#if __has_feature(cxx_rtti) + assert(dynamic_cast<IncompleteItem*>(parent)); +#endif if (parent->type() == ARRAY) { static_cast<IncompleteArray*>(parent)->add(std::move(item)); } else if (parent->type() == MAP) { |