Cleanup: use nested namespaces
This commit is contained in:
@@ -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__ */
|
||||
|
@@ -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__ */
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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__ */
|
||||
|
@@ -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__ */
|
||||
|
@@ -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
|
||||
|
@@ -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__ */
|
||||
|
@@ -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__ */
|
||||
|
@@ -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; \
|
||||
|
@@ -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__ */
|
||||
|
@@ -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__ */
|
||||
|
@@ -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__ */
|
||||
|
@@ -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__ */
|
||||
|
@@ -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__ */
|
||||
|
@@ -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__ */
|
||||
|
@@ -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__ */
|
||||
|
@@ -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__ */
|
||||
|
@@ -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__ */
|
||||
|
@@ -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__ */
|
||||
|
@@ -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__ */
|
||||
|
@@ -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__ */
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -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
|
||||
|
@@ -22,8 +22,7 @@
|
||||
|
||||
#include "BLI_array.hh"
|
||||
|
||||
namespace blender {
|
||||
namespace fn {
|
||||
namespace blender::fn {
|
||||
|
||||
TEST(virtual_array_span, EmptyConstructor)
|
||||
{
|
||||
@@ -145,5 +144,4 @@ TEST(generic_virtual_array_span, IsSingleArray2)
|
||||
EXPECT_FALSE(converted.is_single_array());
|
||||
}
|
||||
|
||||
} // namespace fn
|
||||
} // namespace blender
|
||||
} // namespace blender::fn
|
||||
|
@@ -20,8 +20,7 @@
|
||||
|
||||
#include "testing/testing.h"
|
||||
|
||||
namespace blender {
|
||||
namespace fn {
|
||||
namespace blender::fn {
|
||||
|
||||
TEST(attributes_info, BuildEmpty)
|
||||
{
|
||||
@@ -110,5 +109,4 @@ TEST(mutable_attributes_ref, ComplexTest)
|
||||
EXPECT_EQ(ids[2], 100);
|
||||
}
|
||||
|
||||
} // namespace fn
|
||||
} // namespace blender
|
||||
} // namespace blender::fn
|
||||
|
@@ -18,8 +18,7 @@
|
||||
|
||||
#include "FN_cpp_type.hh"
|
||||
|
||||
namespace blender {
|
||||
namespace fn {
|
||||
namespace blender::fn {
|
||||
|
||||
static const int default_constructed_value = 1;
|
||||
static const int copy_constructed_value = 2;
|
||||
@@ -306,5 +305,4 @@ TEST(cpp_type, FillUninitialized)
|
||||
EXPECT_EQ(buffer2[9], 0);
|
||||
}
|
||||
|
||||
} // namespace fn
|
||||
} // namespace blender
|
||||
} // namespace blender::fn
|
||||
|
@@ -19,8 +19,7 @@
|
||||
|
||||
#include "testing/testing.h"
|
||||
|
||||
namespace blender {
|
||||
namespace fn {
|
||||
namespace blender::fn {
|
||||
|
||||
TEST(generic_vector_array, Constructor)
|
||||
{
|
||||
@@ -114,5 +113,4 @@ TEST(generic_vector_array, Extend)
|
||||
EXPECT_EQ(ref[0][0], 3);
|
||||
}
|
||||
|
||||
} // namespace fn
|
||||
} // namespace blender
|
||||
} // namespace blender::fn
|
||||
|
@@ -21,8 +21,7 @@
|
||||
#include "FN_multi_function_network.hh"
|
||||
#include "FN_multi_function_network_evaluation.hh"
|
||||
|
||||
namespace blender {
|
||||
namespace fn {
|
||||
namespace blender::fn {
|
||||
|
||||
TEST(multi_function_network, Test1)
|
||||
{
|
||||
@@ -266,5 +265,4 @@ TEST(multi_function_network, Test2)
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace fn
|
||||
} // namespace blender
|
||||
} // namespace blender::fn
|
||||
|
@@ -20,8 +20,7 @@
|
||||
#include "FN_multi_function.hh"
|
||||
#include "FN_multi_function_builder.hh"
|
||||
|
||||
namespace blender {
|
||||
namespace fn {
|
||||
namespace blender::fn {
|
||||
|
||||
class AddFunction : public MultiFunction {
|
||||
public:
|
||||
@@ -330,5 +329,4 @@ TEST(multi_function, CustomMF_Constant)
|
||||
EXPECT_EQ(outputs[3], 42);
|
||||
}
|
||||
|
||||
} // namespace fn
|
||||
} // namespace blender
|
||||
} // namespace blender::fn
|
||||
|
@@ -19,8 +19,7 @@
|
||||
#include "FN_cpp_types.hh"
|
||||
#include "FN_spans.hh"
|
||||
|
||||
namespace blender {
|
||||
namespace fn {
|
||||
namespace blender::fn {
|
||||
|
||||
TEST(generic_span, TypeConstructor)
|
||||
{
|
||||
@@ -227,5 +226,4 @@ TEST(generic_virtual_span, SingleConstructor)
|
||||
EXPECT_EQ(converted[2], 5);
|
||||
}
|
||||
|
||||
} // namespace fn
|
||||
} // namespace blender
|
||||
} // namespace blender::fn
|
||||
|
Reference in New Issue
Block a user