From 893e4031f70d7f8baed9cbed3253e5e308f2ee6a Mon Sep 17 00:00:00 2001 From: Austin Henriksen Date: Tue, 7 May 2024 16:34:38 -0400 Subject: [PATCH] Appease the tooling. --- cpp/src/Slice/Parser.cpp | 12 ++++++------ cpp/src/Slice/Parser.h | 10 +++++----- cpp/src/slice2rb/RubyUtil.cpp | 1 - 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index 46290d0d368..f73784a9f0d 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -999,23 +999,23 @@ Slice::Contained::parseFormatMetaData(const list& metaData) } bool -Slice::Contained::isDeprecated(bool check_parent) const +Slice::Contained::isDeprecated(bool checkParent) const { const string deprecate = "deprecate"; string metadata; - ContainedPtr parent = check_parent ? dynamic_pointer_cast(_container) : nullptr; + ContainedPtr parent = checkParent ? dynamic_pointer_cast(_container) : nullptr; - return (findMetaData(deprecate, metadata) || parent && parent->findMetaData(deprecate, metadata)); + return (findMetaData(deprecate, metadata) || (parent && parent->findMetaData(deprecate, metadata))); } optional -Slice::Contained::getDeprecateReason(bool check_parent) const +Slice::Contained::getDeprecateReason(bool checkParent) const { const string prefix = "deprecate:"; string metadata; - ContainedPtr parent = check_parent ? dynamic_pointer_cast(_container) : nullptr; + ContainedPtr parent = checkParent ? dynamic_pointer_cast(_container) : nullptr; - if (findMetaData(prefix, metadata) || parent && parent->findMetaData(prefix, metadata)) + if (findMetaData(prefix, metadata) || (parent && parent->findMetaData(prefix, metadata))) { assert(metadata.find(prefix) == 0); return metadata.substr(prefix.size()); diff --git a/cpp/src/Slice/Parser.h b/cpp/src/Slice/Parser.h index cb6a669a977..df7b054acaf 100644 --- a/cpp/src/Slice/Parser.h +++ b/cpp/src/Slice/Parser.h @@ -398,16 +398,16 @@ namespace Slice static FormatType parseFormatMetaData(const std::list&); /// Returns true if this item is deprecated (due to the presence of `deprecate` metadata). - /// @param check_parent If true, this item's immediate container will also be checked for `deprecate` metadata. + /// @param checkParent If true, this item's immediate container will also be checked for `deprecate` metadata. /// @return True if this item (or possibly its container) has `deprecate` metadata on it, false otherwise. - bool isDeprecated(bool) const; + bool isDeprecated(bool checkParent) const; /// If this item is deprecated, return its deprecation message (if present). /// This is the string argument that can be optionally provided with `deprecate` metadata. - /// @param check_parent If true, this item's immediate container will also be checked for `deprecate` messages. - /// @return The message provided to the `deprecate` metadata, if present. If `check_parent` is true, and both + /// @param checkParent If true, this item's immediate container will also be checked for `deprecate` messages. + /// @return The message provided to the `deprecate` metadata, if present. If `checkParent` is true, and both /// this item and its parent have 'deprecate' messages, the item's message is returned, not its container's. - std::optional getDeprecateReason(bool) const; + std::optional getDeprecateReason(bool checkParent) const; enum ContainedType { diff --git a/cpp/src/slice2rb/RubyUtil.cpp b/cpp/src/slice2rb/RubyUtil.cpp index 66aa0ed7818..8f84b7c8855 100644 --- a/cpp/src/slice2rb/RubyUtil.cpp +++ b/cpp/src/slice2rb/RubyUtil.cpp @@ -670,7 +670,6 @@ Slice::Ruby::CodeVisitor::visitInterfaceDefStart(const InterfaceDefPtr& p) } _out << "])"; - if ((*s)->isDeprecated(true)) { // Get the deprecation reason if present, or default to an empty string.