diff options
Diffstat (limited to 'source/blender')
28 files changed, 56 insertions, 112 deletions
diff --git a/source/blender/blenkernel/BKE_derived_node_tree.hh b/source/blender/blenkernel/BKE_derived_node_tree.hh index 59f38355330..2ed96f0c60d 100644 --- a/source/blender/blenkernel/BKE_derived_node_tree.hh +++ b/source/blender/blenkernel/BKE_derived_node_tree.hh @@ -32,8 +32,7 @@ #include "BKE_node_tree_ref.hh" -namespace blender { -namespace bke { +namespace blender::bke { class DSocket; class DInputSocket; @@ -494,7 +493,6 @@ inline Span<const DGroupInput *> DerivedNodeTree::group_inputs() const return group_inputs_.as_span(); } -} // namespace bke -} // namespace blender +} // namespace blender::bke #endif /* __BKE_DERIVED_NODE_TREE_HH__ */ diff --git a/source/blender/blenkernel/BKE_node_tree_ref.hh b/source/blender/blenkernel/BKE_node_tree_ref.hh index 619a84f6914..e25849cb569 100644 --- a/source/blender/blenkernel/BKE_node_tree_ref.hh +++ b/source/blender/blenkernel/BKE_node_tree_ref.hh @@ -58,8 +58,7 @@ #include "RNA_access.h" -namespace blender { -namespace bke { +namespace blender::bke { class SocketRef; class InputSocketRef; @@ -441,7 +440,6 @@ inline bNodeTree *NodeTreeRef::btree() const return btree_; } -} // namespace bke -} // namespace blender +} // namespace blender::bke #endif /* __BKE_NODE_TREE_REF_HH__ */ diff --git a/source/blender/blenkernel/intern/derived_node_tree.cc b/source/blender/blenkernel/intern/derived_node_tree.cc index 83ef45189bc..01317eeb5ce 100644 --- a/source/blender/blenkernel/intern/derived_node_tree.cc +++ b/source/blender/blenkernel/intern/derived_node_tree.cc @@ -20,8 +20,7 @@ #define UNINITIALIZED_ID UINT32_MAX -namespace blender { -namespace bke { +namespace blender::bke { static const NodeTreeRef &get_tree_ref(NodeTreeRefMap &node_tree_refs, bNodeTree *btree) { @@ -439,5 +438,4 @@ std::string DerivedNodeTree::to_dot() const return digraph.to_dot_string(); } -} // namespace bke -} // namespace blender +} // namespace blender::bke diff --git a/source/blender/blenkernel/intern/node_tree_ref.cc b/source/blender/blenkernel/intern/node_tree_ref.cc index 1803243d4cc..54ea2d338db 100644 --- a/source/blender/blenkernel/intern/node_tree_ref.cc +++ b/source/blender/blenkernel/intern/node_tree_ref.cc @@ -18,8 +18,7 @@ #include "BLI_dot_export.hh" -namespace blender { -namespace bke { +namespace blender::bke { NodeTreeRef::NodeTreeRef(bNodeTree *btree) : btree_(btree) { @@ -175,5 +174,4 @@ std::string NodeTreeRef::to_dot() const return digraph.to_dot_string(); } -} // namespace bke -} // namespace blender +} // namespace blender::bke diff --git a/source/blender/blenkernel/intern/simulation.cc b/source/blender/blenkernel/intern/simulation.cc index eef848aff72..c4a35141b0d 100644 --- a/source/blender/blenkernel/intern/simulation.cc +++ b/source/blender/blenkernel/intern/simulation.cc @@ -164,8 +164,7 @@ void *BKE_simulation_add(Main *bmain, const char *name) return simulation; } -namespace blender { -namespace bke { +namespace blender::bke { static MutableSpan<float3> get_particle_positions(ParticleSimulationState *state) { @@ -259,8 +258,7 @@ static void simulation_data_update(Depsgraph *depsgraph, Scene *scene, Simulatio } } -} // namespace bke -} // namespace blender +} // namespace blender::bke void BKE_simulation_data_update(Depsgraph *depsgraph, Scene *scene, Simulation *simulation) { diff --git a/source/blender/blenlib/BLI_dot_export.hh b/source/blender/blenlib/BLI_dot_export.hh index bad7e4c57a8..450cb2ef58c 100644 --- a/source/blender/blenlib/BLI_dot_export.hh +++ b/source/blender/blenlib/BLI_dot_export.hh @@ -34,8 +34,7 @@ #include <optional> #include <sstream> -namespace blender { -namespace dot { +namespace blender::dot { class Graph; class DirectedGraph; @@ -283,7 +282,6 @@ class NodeWithSocketsRef { } }; -} // namespace dot -} // namespace blender +} // namespace blender::dot #endif /* __BLI_DOT_EXPORT_HH__ */ diff --git a/source/blender/blenlib/BLI_dot_export_attribute_enums.hh b/source/blender/blenlib/BLI_dot_export_attribute_enums.hh index 12019a49194..94c7025b2a6 100644 --- a/source/blender/blenlib/BLI_dot_export_attribute_enums.hh +++ b/source/blender/blenlib/BLI_dot_export_attribute_enums.hh @@ -19,8 +19,7 @@ #include "BLI_string_ref.hh" -namespace blender { -namespace dot { +namespace blender ::dot { enum class Attr_rankdir { LeftToRight, @@ -119,7 +118,6 @@ inline StringRef dirType_to_string(Attr_dirType value) return ""; } -} // namespace dot -} // namespace blender +} // namespace blender::dot #endif /* __BLI_DOT_EXPORT_ATTRIBUTE_ENUMS_HH__ */ diff --git a/source/blender/blenlib/intern/dot_export.cc b/source/blender/blenlib/intern/dot_export.cc index 5c02ab977b8..0f60ea6fd1b 100644 --- a/source/blender/blenlib/intern/dot_export.cc +++ b/source/blender/blenlib/intern/dot_export.cc @@ -18,8 +18,7 @@ #include "BLI_dot_export.hh" -namespace blender { -namespace dot { +namespace blender::dot { /* Graph Building ************************************************/ @@ -301,5 +300,4 @@ NodeWithSocketsRef::NodeWithSocketsRef(Node &node, node_->set_shape(Attr_shape::Rectangle); } -} // namespace dot -} // namespace blender +} // namespace blender::dot diff --git a/source/blender/functions/FN_array_spans.hh b/source/blender/functions/FN_array_spans.hh index 139b949e55a..3f71b36c49c 100644 --- a/source/blender/functions/FN_array_spans.hh +++ b/source/blender/functions/FN_array_spans.hh @@ -26,8 +26,7 @@ #include "FN_spans.hh" -namespace blender { -namespace fn { +namespace blender::fn { /** * Depending on the use case, the referenced data might have a different structure. More @@ -203,7 +202,6 @@ class GVArraySpan : public VArraySpanBase<void> { } }; -} // namespace fn -} // namespace blender +} // namespace blender::fn #endif /* __FN_ARRAY_SPANS_HH__ */ diff --git a/source/blender/functions/FN_attributes_ref.hh b/source/blender/functions/FN_attributes_ref.hh index 276c424ebf6..3c31665e0b5 100644 --- a/source/blender/functions/FN_attributes_ref.hh +++ b/source/blender/functions/FN_attributes_ref.hh @@ -33,8 +33,7 @@ #include "BLI_utility_mixins.hh" #include "BLI_vector_set.hh" -namespace blender { -namespace fn { +namespace blender::fn { class AttributesInfo; @@ -242,7 +241,6 @@ class MutableAttributesRef { } }; -} // namespace fn -} // namespace blender +} // namespace blender::fn #endif /* __FN_ATTRIBUTES_REF_HH__ */ diff --git a/source/blender/functions/FN_cpp_type.hh b/source/blender/functions/FN_cpp_type.hh index e8f0335e7c9..1681ff9fe8c 100644 --- a/source/blender/functions/FN_cpp_type.hh +++ b/source/blender/functions/FN_cpp_type.hh @@ -70,8 +70,7 @@ #include "BLI_math_base.h" #include "BLI_string_ref.hh" -namespace blender { -namespace fn { +namespace blender::fn { class CPPType { public: @@ -720,8 +719,7 @@ static std::unique_ptr<const CPPType> create_cpp_type(StringRef name, const T &d return std::unique_ptr<const CPPType>(type); } -} // namespace fn -} // namespace blender +} // namespace blender::fn #define MAKE_CPP_TYPE(IDENTIFIER, TYPE_NAME) \ static TYPE_NAME default_value_##IDENTIFIER; \ diff --git a/source/blender/functions/FN_cpp_types.hh b/source/blender/functions/FN_cpp_types.hh index c39b284d5c4..704a1363935 100644 --- a/source/blender/functions/FN_cpp_types.hh +++ b/source/blender/functions/FN_cpp_types.hh @@ -26,8 +26,7 @@ #include "FN_cpp_type.hh" -namespace blender { -namespace fn { +namespace blender::fn { extern const CPPType &CPPType_bool; @@ -44,7 +43,6 @@ extern const CPPType &CPPType_Color4b; extern const CPPType &CPPType_string; -} // namespace fn -} // namespace blender +} // namespace blender::fn #endif /* __FN_CPP_TYPES_HH__ */ diff --git a/source/blender/functions/FN_generic_vector_array.hh b/source/blender/functions/FN_generic_vector_array.hh index 065c8622b47..f28e94b34ee 100644 --- a/source/blender/functions/FN_generic_vector_array.hh +++ b/source/blender/functions/FN_generic_vector_array.hh @@ -35,8 +35,7 @@ #include "BLI_linear_allocator.hh" #include "BLI_utility_mixins.hh" -namespace blender { -namespace fn { +namespace blender::fn { template<typename T> class GVectorArrayRef; @@ -202,7 +201,6 @@ template<typename T> class GVectorArrayRef { } }; -} // namespace fn -} // namespace blender +} // namespace blender::fn #endif /* __FN_GENERIC_VECTOR_ARRAY_HH__ */ diff --git a/source/blender/functions/FN_multi_function.hh b/source/blender/functions/FN_multi_function.hh index dd5239a4730..452fd5472ce 100644 --- a/source/blender/functions/FN_multi_function.hh +++ b/source/blender/functions/FN_multi_function.hh @@ -48,8 +48,7 @@ #include "FN_multi_function_context.hh" #include "FN_multi_function_params.hh" -namespace blender { -namespace fn { +namespace blender::fn { class MultiFunction { private: @@ -102,7 +101,6 @@ inline MFParamsBuilder::MFParamsBuilder(const class MultiFunction &fn, uint min_ extern const MultiFunction &dummy_multi_function; -} // namespace fn -} // namespace blender +} // namespace blender::fn #endif /* __FN_MULTI_FUNCTION_HH__ */ diff --git a/source/blender/functions/FN_multi_function_builder.hh b/source/blender/functions/FN_multi_function_builder.hh index dfe4a25029e..abc1e5d0723 100644 --- a/source/blender/functions/FN_multi_function_builder.hh +++ b/source/blender/functions/FN_multi_function_builder.hh @@ -27,8 +27,7 @@ #include "FN_multi_function.hh" -namespace blender { -namespace fn { +namespace blender::fn { /** * Generates a multi-function with the following parameters: @@ -226,7 +225,6 @@ template<typename T> class CustomMF_Constant : public MultiFunction { } }; -} // namespace fn -} // namespace blender +} // namespace blender::fn #endif /* __FN_MULTI_FUNCTION_BUILDER_HH__ */ diff --git a/source/blender/functions/FN_multi_function_context.hh b/source/blender/functions/FN_multi_function_context.hh index 2fb1cc94812..3a448cc2c6e 100644 --- a/source/blender/functions/FN_multi_function_context.hh +++ b/source/blender/functions/FN_multi_function_context.hh @@ -29,8 +29,7 @@ #include "BLI_utildefines.h" -namespace blender { -namespace fn { +namespace blender::fn { class MFContextBuilder { }; @@ -42,7 +41,6 @@ class MFContext { } }; -} // namespace fn -} // namespace blender +} // namespace blender::fn #endif /* __FN_MULTI_FUNCTION_CONTEXT_HH__ */ diff --git a/source/blender/functions/FN_multi_function_data_type.hh b/source/blender/functions/FN_multi_function_data_type.hh index 8bf2b06a9cc..78f0d96fb80 100644 --- a/source/blender/functions/FN_multi_function_data_type.hh +++ b/source/blender/functions/FN_multi_function_data_type.hh @@ -27,8 +27,7 @@ #include "FN_cpp_type.hh" -namespace blender { -namespace fn { +namespace blender::fn { class MFDataType { public: @@ -121,7 +120,6 @@ inline bool operator!=(const MFDataType &a, const MFDataType &b) return !(a == b); } -} // namespace fn -} // namespace blender +} // namespace blender::fn #endif /* __FN_MULTI_FUNCTION_DATA_TYPE_HH__ */ diff --git a/source/blender/functions/FN_multi_function_network.hh b/source/blender/functions/FN_multi_function_network.hh index 2c374679939..a9d8508cdb8 100644 --- a/source/blender/functions/FN_multi_function_network.hh +++ b/source/blender/functions/FN_multi_function_network.hh @@ -46,8 +46,7 @@ #include "BLI_vector_set.hh" -namespace blender { -namespace fn { +namespace blender::fn { class MFNode; class MFFunctionNode; @@ -489,7 +488,6 @@ inline uint MFNetwork::max_socket_id() const return socket_or_null_by_id_.size() - 1; } -} // namespace fn -} // namespace blender +} // namespace blender::fn #endif /* __FN_MULTI_FUNCTION_NETWORK_HH__ */ diff --git a/source/blender/functions/FN_multi_function_network_evaluation.hh b/source/blender/functions/FN_multi_function_network_evaluation.hh index 0b129930251..11606869ca2 100644 --- a/source/blender/functions/FN_multi_function_network_evaluation.hh +++ b/source/blender/functions/FN_multi_function_network_evaluation.hh @@ -23,8 +23,7 @@ #include "FN_multi_function_network.hh" -namespace blender { -namespace fn { +namespace blender::fn { class MFNetworkEvaluationStorage; @@ -60,7 +59,6 @@ class MFNetworkEvaluator : public MultiFunction { Span<const MFInputSocket *> remaining_outputs) const; }; -} // namespace fn -} // namespace blender +} // namespace blender::fn #endif /* __FN_MULTI_FUNCTION_NETWORK_EVALUATION_HH__ */ diff --git a/source/blender/functions/FN_multi_function_param_type.hh b/source/blender/functions/FN_multi_function_param_type.hh index e9125678270..0e43e355b53 100644 --- a/source/blender/functions/FN_multi_function_param_type.hh +++ b/source/blender/functions/FN_multi_function_param_type.hh @@ -35,8 +35,7 @@ #include "FN_multi_function_data_type.hh" -namespace blender { -namespace fn { +namespace blender::fn { class MFParamType { public: @@ -159,7 +158,6 @@ inline bool operator!=(const MFParamType &a, const MFParamType &b) return !(a == b); } -} // namespace fn -} // namespace blender +} // namespace blender::fn #endif /* __FN_MULTI_FUNCTION_PARAM_TYPE_HH__ */ diff --git a/source/blender/functions/FN_multi_function_params.hh b/source/blender/functions/FN_multi_function_params.hh index 570bad4fd86..e6683693a0a 100644 --- a/source/blender/functions/FN_multi_function_params.hh +++ b/source/blender/functions/FN_multi_function_params.hh @@ -29,8 +29,7 @@ #include "FN_generic_vector_array.hh" #include "FN_multi_function_signature.hh" -namespace blender { -namespace fn { +namespace blender::fn { class MFParamsBuilder { private: @@ -233,7 +232,6 @@ class MFParams { } }; -} // namespace fn -} // namespace blender +} // namespace blender::fn #endif /* __FN_MULTI_FUNCTION_PARAMS_HH__ */ diff --git a/source/blender/functions/FN_multi_function_signature.hh b/source/blender/functions/FN_multi_function_signature.hh index 13bf662b21b..e2cf783753e 100644 --- a/source/blender/functions/FN_multi_function_signature.hh +++ b/source/blender/functions/FN_multi_function_signature.hh @@ -28,8 +28,7 @@ #include "BLI_vector.hh" -namespace blender { -namespace fn { +namespace blender::fn { struct MFSignature { std::string function_name; @@ -160,7 +159,6 @@ class MFSignatureBuilder { } }; -} // namespace fn -} // namespace blender +} // namespace blender::fn #endif /* __FN_MULTI_FUNCTION_SIGNATURE_HH__ */ diff --git a/source/blender/functions/FN_spans.hh b/source/blender/functions/FN_spans.hh index 0bb5ea7938d..b2622eab95f 100644 --- a/source/blender/functions/FN_spans.hh +++ b/source/blender/functions/FN_spans.hh @@ -43,8 +43,7 @@ #include "FN_cpp_type.hh" -namespace blender { -namespace fn { +namespace blender::fn { /** * A generic span. It behaves just like a blender::Span<T>, but the type is only known at run-time. @@ -398,7 +397,6 @@ class GVSpan : public VSpanBase<void> { } }; -} // namespace fn -} // namespace blender +} // namespace blender::fn #endif /* __FN_SPANS_HH__ */ diff --git a/source/blender/functions/intern/attributes_ref.cc b/source/blender/functions/intern/attributes_ref.cc index 047fa12adb4..f61a9165c47 100644 --- a/source/blender/functions/intern/attributes_ref.cc +++ b/source/blender/functions/intern/attributes_ref.cc @@ -16,8 +16,7 @@ #include "FN_attributes_ref.hh" -namespace blender { -namespace fn { +namespace blender::fn { AttributesInfoBuilder::~AttributesInfoBuilder() { @@ -68,5 +67,4 @@ AttributesInfo::~AttributesInfo() } } -} // namespace fn -} // namespace blender +} // namespace blender::fn diff --git a/source/blender/functions/intern/cpp_types.cc b/source/blender/functions/intern/cpp_types.cc index cb4b065e5bc..052278afd65 100644 --- a/source/blender/functions/intern/cpp_types.cc +++ b/source/blender/functions/intern/cpp_types.cc @@ -21,8 +21,7 @@ #include "BLI_float3.hh" #include "BLI_float4x4.hh" -namespace blender { -namespace fn { +namespace blender::fn { MAKE_CPP_TYPE(bool, bool) @@ -39,5 +38,4 @@ MAKE_CPP_TYPE(Color4b, blender::Color4b) MAKE_CPP_TYPE(string, std::string) -} // namespace fn -} // namespace blender +} // namespace blender::fn diff --git a/source/blender/functions/intern/multi_function.cc b/source/blender/functions/intern/multi_function.cc index 8eb5355511d..a41c6bdf3cd 100644 --- a/source/blender/functions/intern/multi_function.cc +++ b/source/blender/functions/intern/multi_function.cc @@ -16,8 +16,7 @@ #include "FN_multi_function.hh" -namespace blender { -namespace fn { +namespace blender::fn { class DummyMultiFunction : public MultiFunction { public: @@ -36,5 +35,4 @@ class DummyMultiFunction : public MultiFunction { static DummyMultiFunction dummy_multi_function_; const MultiFunction &dummy_multi_function = dummy_multi_function_; -} // namespace fn -} // namespace blender +} // namespace blender::fn diff --git a/source/blender/functions/intern/multi_function_network.cc b/source/blender/functions/intern/multi_function_network.cc index f2a28776660..5df70d92a4e 100644 --- a/source/blender/functions/intern/multi_function_network.cc +++ b/source/blender/functions/intern/multi_function_network.cc @@ -17,8 +17,7 @@ #include "BLI_dot_export.hh" #include "FN_multi_function_network.hh" -namespace blender { -namespace fn { +namespace blender::fn { MFNetwork::~MFNetwork() { @@ -274,5 +273,4 @@ std::string MFNetwork::to_dot() const return digraph.to_dot_string(); } -} // namespace fn -} // namespace blender +} // namespace blender::fn diff --git a/source/blender/functions/intern/multi_function_network_evaluation.cc b/source/blender/functions/intern/multi_function_network_evaluation.cc index 187af4c8aa6..08a254dc300 100644 --- a/source/blender/functions/intern/multi_function_network_evaluation.cc +++ b/source/blender/functions/intern/multi_function_network_evaluation.cc @@ -39,8 +39,7 @@ #include "BLI_stack.hh" -namespace blender { -namespace fn { +namespace blender::fn { struct Value; @@ -1059,5 +1058,4 @@ GVArraySpan MFNetworkEvaluationStorage::get_vector_input__single(const MFInputSo /** \} */ -} // namespace fn -} // namespace blender +} // namespace blender::fn |