From a5635de39307a5ed1d5d2f97a545715cb7c3e946 Mon Sep 17 00:00:00 2001 From: Stephane Del Pino <stephane.delpino44@gmail.com> Date: Wed, 4 Mar 2020 19:12:32 +0100 Subject: [PATCH] Fix a few naming issues --- src/language/node_processor/AffectationProcessor.hpp | 12 ++++++------ .../node_processor/BinaryExpressionProcessor.hpp | 6 +++--- .../node_processor/BuiltinFunctionProcessor.hpp | 6 +++--- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/language/node_processor/AffectationProcessor.hpp b/src/language/node_processor/AffectationProcessor.hpp index fc469edae..fbd36c008 100644 --- a/src/language/node_processor/AffectationProcessor.hpp +++ b/src/language/node_processor/AffectationProcessor.hpp @@ -65,7 +65,7 @@ class AffectationExecutor final : public IAffectationExecutor private: ValueT& m_lhs; - static inline const bool _is_defined{[] { + static inline const bool m_is_defined{[] { if constexpr (std::is_same_v<std::decay_t<ValueT>, bool>) { if constexpr (not std::is_same_v<OperatorT, language::eq_op>) { return false; @@ -78,7 +78,7 @@ class AffectationExecutor final : public IAffectationExecutor AffectationExecutor(ASTNode& node, ValueT& lhs) : m_lhs(lhs) { // LCOV_EXCL_START - if constexpr (not _is_defined) { + if constexpr (not m_is_defined) { throw parse_error("unexpected error: invalid operands to affectation expression", std::vector{node.begin()}); } // LCOV_EXCL_STOP @@ -87,7 +87,7 @@ class AffectationExecutor final : public IAffectationExecutor PUGS_INLINE void affect(ExecutionPolicy&, DataVariant&& rhs) { - if constexpr (_is_defined) { + if constexpr (m_is_defined) { if constexpr (not std::is_same_v<DataT, ZeroType>) { if constexpr (std::is_same_v<ValueT, std::string>) { if constexpr (std::is_same_v<OperatorT, language::eq_op>) { @@ -138,7 +138,7 @@ class ComponentAffectationExecutor final : public IAffectationExecutor ArrayT& m_lhs_array; ASTNode& m_index_expression; - static inline const bool _is_defined{[] { + static inline const bool m_is_defined{[] { if constexpr (not std::is_same_v<typename ArrayT::data_type, ValueT>) { return false; } else if constexpr (std::is_same_v<std::decay_t<ValueT>, bool>) { @@ -154,7 +154,7 @@ class ComponentAffectationExecutor final : public IAffectationExecutor : m_lhs_array{lhs_array}, m_index_expression{index_expression} { // LCOV_EXCL_START - if constexpr (not _is_defined) { + if constexpr (not m_is_defined) { throw parse_error("unexpected error: invalid operands to affectation expression", std::vector{node.begin()}); } // LCOV_EXCL_STOP @@ -163,7 +163,7 @@ class ComponentAffectationExecutor final : public IAffectationExecutor PUGS_INLINE void affect(ExecutionPolicy& exec_policy, DataVariant&& rhs) { - if constexpr (_is_defined) { + if constexpr (m_is_defined) { const int64_t index_value = [&](DataVariant&& value_variant) -> int64_t { int64_t index_value = 0; std::visit( diff --git a/src/language/node_processor/BinaryExpressionProcessor.hpp b/src/language/node_processor/BinaryExpressionProcessor.hpp index 8089ea9d2..c6302a9c7 100644 --- a/src/language/node_processor/BinaryExpressionProcessor.hpp +++ b/src/language/node_processor/BinaryExpressionProcessor.hpp @@ -187,7 +187,7 @@ class BinaryExpressionProcessor final : public INodeProcessor } } - static inline const bool _is_defined{[] { + static inline const bool m_is_defined{[] { if constexpr (std::is_same_v<BinaryOpT, language::xor_op>) { return std::is_same_v<std::decay_t<A_DataT>, std::decay_t<B_DataT>> and std::is_integral_v<std::decay_t<A_DataT>>; } @@ -198,7 +198,7 @@ class BinaryExpressionProcessor final : public INodeProcessor DataVariant execute(ExecutionPolicy& exec_policy) { - if constexpr (_is_defined) { + if constexpr (m_is_defined) { return this->_eval(m_node.children[0]->execute(exec_policy), m_node.children[1]->execute(exec_policy)); } else { return {}; // LCOV_EXCL_LINE @@ -207,7 +207,7 @@ class BinaryExpressionProcessor final : public INodeProcessor BinaryExpressionProcessor(ASTNode& node) : m_node{node} { - if constexpr (not _is_defined) { + if constexpr (not m_is_defined) { // LCOV_EXCL_START throw parse_error("invalid operands to binary expression", std::vector{m_node.begin()}); // LCOV_EXCL_STOP diff --git a/src/language/node_processor/BuiltinFunctionProcessor.hpp b/src/language/node_processor/BuiltinFunctionProcessor.hpp index 31a561c90..7af54642e 100644 --- a/src/language/node_processor/BuiltinFunctionProcessor.hpp +++ b/src/language/node_processor/BuiltinFunctionProcessor.hpp @@ -12,16 +12,16 @@ class BuiltinFunctionExpressionProcessor final : public INodeProcessor { private: - std::shared_ptr<IBuiltinFunctionEmbedder> m_embedded_; + std::shared_ptr<IBuiltinFunctionEmbedder> m_embedded; public: DataVariant execute(ExecutionPolicy& exec_policy) { - return m_embedded_->apply(exec_policy.currentContext().values()); + return m_embedded->apply(exec_policy.currentContext().values()); } - BuiltinFunctionExpressionProcessor(std::shared_ptr<IBuiltinFunctionEmbedder> embedded_) : m_embedded_(embedded_) {} + BuiltinFunctionExpressionProcessor(std::shared_ptr<IBuiltinFunctionEmbedder> embedded) : m_embedded(embedded) {} }; class BuiltinFunctionProcessor : public INodeProcessor -- GitLab