Cleanup: Clang-tidy, modernize-concat-nested-namespaces

This commit is contained in:
Ankit Meel 2020-11-07 18:17:12 +05:30
parent a452fcb9a5
commit 4525049aa0
69 changed files with 134 additions and 304 deletions

View File

@ -38,7 +38,6 @@ Checks: >
-modernize-deprecated-headers,
-modernize-avoid-c-arrays,
-modernize-use-equals-default,
-modernize-concat-nested-namespaces,
-modernize-use-nodiscard,
-modernize-use-using,
-modernize-loop-convert,

View File

@ -30,8 +30,7 @@
#include "bmesh_boolean.h"
#include "bmesh_edgesplit.h"
namespace blender {
namespace meshintersect {
namespace blender::meshintersect {
#ifdef WITH_GMP
@ -374,8 +373,7 @@ static bool bmesh_boolean(BMesh *bm,
#endif // WITH_GMP
} // namespace meshintersect
} // namespace blender
} // namespace blender::meshintersect
extern "C" {
/**

View File

@ -50,8 +50,7 @@
#include "DEG_depsgraph.h"
namespace blender {
namespace deg {
namespace blender::deg {
bool deg_check_id_in_depsgraph(const Depsgraph *graph, ID *id_orig)
{
@ -241,5 +240,4 @@ void deg_graph_build_finalize(Main *bmain, Depsgraph *graph)
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -31,8 +31,7 @@
#include "BKE_animsys.h"
namespace blender {
namespace deg {
namespace blender::deg {
/* Animated property storage. */
@ -178,5 +177,4 @@ AnimatedPropertyStorage *DepsgraphBuilderCache::ensureInitializedAnimatedPropert
return animated_property_storage;
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -37,8 +37,7 @@
#include "intern/depsgraph.h"
#include "intern/depsgraph_relation.h"
namespace blender {
namespace deg {
namespace blender::deg {
namespace {
@ -235,5 +234,4 @@ void deg_graph_detect_cycles(Depsgraph *graph)
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -25,8 +25,7 @@
#include "DNA_ID.h"
namespace blender {
namespace deg {
namespace blender::deg {
BuilderMap::BuilderMap()
{
@ -59,5 +58,4 @@ int BuilderMap::getIDTag(ID *id) const
return id_tags_.lookup_default(id, 0);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -120,8 +120,7 @@
#include "intern/node/deg_node_id.h"
#include "intern/node/deg_node_operation.h"
namespace blender {
namespace deg {
namespace blender::deg {
/* ************ */
/* Node Builder */
@ -1930,5 +1929,4 @@ void DepsgraphNodeBuilder::constraint_walk(bConstraint * /*con*/,
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -54,8 +54,7 @@
#include "intern/node/deg_node_component.h"
#include "intern/node/deg_node_operation.h"
namespace blender {
namespace deg {
namespace blender::deg {
void DepsgraphNodeBuilder::build_pose_constraints(Object *object,
bPoseChannel *pchan,
@ -345,5 +344,4 @@ void DepsgraphNodeBuilder::build_proxy_rig(Object *object, bool is_object_visibl
op_node->set_as_exit();
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -25,8 +25,7 @@
#include "DNA_scene_types.h"
namespace blender {
namespace deg {
namespace blender::deg {
void DepsgraphNodeBuilder::build_scene_render(Scene *scene, ViewLayer *view_layer)
{
@ -88,5 +87,4 @@ void DepsgraphNodeBuilder::build_scene_compositor(Scene *scene)
build_nodetree(scene->nodetree);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -55,8 +55,7 @@
#include "intern/node/deg_node_component.h"
#include "intern/node/deg_node_operation.h"
namespace blender {
namespace deg {
namespace blender::deg {
void DepsgraphNodeBuilder::build_layer_collections(ListBase *lb)
{
@ -175,5 +174,4 @@ void DepsgraphNodeBuilder::build_view_layer(Scene *scene,
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -28,8 +28,7 @@
#include "BLI_utildefines.h"
namespace blender {
namespace deg {
namespace blender::deg {
RootPChanMap::RootPChanMap()
{
@ -78,5 +77,4 @@ bool RootPChanMap::has_common_root(const char *bone1, const char *bone2) const
return Set<StringRefNull>::Intersects(*bone1_roots, *bone2_roots);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -120,8 +120,7 @@
#include "intern/depsgraph_relation.h"
#include "intern/depsgraph_type.h"
namespace blender {
namespace deg {
namespace blender::deg {
/* ***************** */
/* Relations Builder */
@ -2926,5 +2925,4 @@ void DepsgraphRelationBuilder::constraint_walk(bConstraint * /*con*/,
data->builder->build_id(id);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -35,8 +35,7 @@
#include "intern/depsgraph_relation.h"
#include "intern/node/deg_node.h"
namespace blender {
namespace deg {
namespace blender::deg {
DriverDescriptor::DriverDescriptor(PointerRNA *id_ptr, FCurve *fcu)
: id_ptr_(id_ptr),
@ -252,5 +251,4 @@ void DepsgraphRelationBuilder::build_driver_relations(IDNode *id_node)
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -25,8 +25,7 @@
#include "intern/builder/deg_builder_relations.h"
namespace blender {
namespace deg {
namespace blender::deg {
////////////////////////////////////////////////////////////////////////////////
// Time source.
@ -193,5 +192,4 @@ string RNAPathKey::identifier() const
return string("RnaPathKey(") + "id: " + id_name + ", prop: '" + prop_name + "')";
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -58,8 +58,7 @@
#include "intern/depsgraph_relation.h"
#include "intern/depsgraph_type.h"
namespace blender {
namespace deg {
namespace blender::deg {
/* IK Solver Eval Steps */
void DepsgraphRelationBuilder::build_ik_pose(Object *object,
@ -510,5 +509,4 @@ void DepsgraphRelationBuilder::build_proxy_rig(Object *object)
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -25,8 +25,7 @@
#include "DNA_scene_types.h"
namespace blender {
namespace deg {
namespace blender::deg {
void DepsgraphRelationBuilder::build_scene_render(Scene *scene, ViewLayer *view_layer)
{
@ -76,5 +75,4 @@ void DepsgraphRelationBuilder::build_scene_compositor(Scene *scene)
build_nodetree(scene->nodetree);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -56,8 +56,7 @@
#include "intern/depsgraph_type.h"
namespace blender {
namespace deg {
namespace blender::deg {
void DepsgraphRelationBuilder::build_layer_collections(ListBase *lb)
{
@ -154,5 +153,4 @@ void DepsgraphRelationBuilder::build_view_layer(Scene *scene,
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -33,8 +33,7 @@
#include "intern/depsgraph_relation.h"
#include "intern/depsgraph_type.h"
namespace blender {
namespace deg {
namespace blender::deg {
static inline bool is_unused_noop(OperationNode *op_node)
{
@ -85,5 +84,4 @@ void deg_graph_remove_unused_noops(Depsgraph *graph)
(::Depsgraph *)graph, BUILD, "Removed %d relations to no-op nodes\n", num_removed_relations);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -48,8 +48,7 @@
#include "intern/node/deg_node_id.h"
#include "intern/node/deg_node_operation.h"
namespace blender {
namespace deg {
namespace blender::deg {
/* ********************************* ID Data ******************************** */
@ -400,5 +399,4 @@ RNANodeQueryIDData *RNANodeQuery::ensure_id_data(const ID *id)
return id_data.get();
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -33,8 +33,7 @@
#include "intern/depsgraph.h"
#include "intern/depsgraph_relation.h"
namespace blender {
namespace deg {
namespace blender::deg {
/* -------------------------------------------------- */
@ -110,5 +109,4 @@ void deg_graph_transitive_reduction(Depsgraph *graph)
DEG_DEBUG_PRINTF((::Depsgraph *)graph, BUILD, "Removed %d relations\n", num_removed_relations);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -30,8 +30,7 @@
#include "deg_builder_relations.h"
#include "deg_builder_transitive.h"
namespace blender {
namespace deg {
namespace blender::deg {
AbstractBuilderPipeline::AbstractBuilderPipeline(::Depsgraph *graph)
: deg_graph_(reinterpret_cast<Depsgraph *>(graph)),
@ -124,5 +123,4 @@ unique_ptr<DepsgraphRelationBuilder> AbstractBuilderPipeline::construct_relation
return std::make_unique<DepsgraphRelationBuilder>(bmain_, deg_graph_, &builder_cache_);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -25,8 +25,7 @@
#include "DNA_layer_types.h"
namespace blender {
namespace deg {
namespace blender::deg {
namespace {
@ -73,5 +72,4 @@ unique_ptr<DepsgraphRelationBuilder> AllObjectsBuilderPipeline::construct_relati
return std::make_unique<AllObjectsRelationBuilder>(bmain_, deg_graph_, &builder_cache_);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -23,8 +23,7 @@
#include "intern/builder/deg_builder_relations.h"
#include "intern/depsgraph.h"
namespace blender {
namespace deg {
namespace blender::deg {
CompositorBuilderPipeline::CompositorBuilderPipeline(::Depsgraph *graph, bNodeTree *nodetree)
: AbstractBuilderPipeline(graph), nodetree_(nodetree)
@ -44,5 +43,4 @@ void CompositorBuilderPipeline::build_relations(DepsgraphRelationBuilder &relati
relation_builder.build_nodetree(nodetree_);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -25,8 +25,7 @@
#include "intern/builder/deg_builder_relations.h"
#include "intern/depsgraph.h"
namespace blender {
namespace deg {
namespace blender::deg {
namespace {
@ -146,5 +145,4 @@ void FromIDsBuilderPipeline::build_relations(DepsgraphRelationBuilder &relation_
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -23,8 +23,7 @@
#include "intern/builder/deg_builder_relations.h"
#include "intern/depsgraph.h"
namespace blender {
namespace deg {
namespace blender::deg {
RenderBuilderPipeline::RenderBuilderPipeline(::Depsgraph *graph) : AbstractBuilderPipeline(graph)
{
@ -41,5 +40,4 @@ void RenderBuilderPipeline::build_relations(DepsgraphRelationBuilder &relation_b
relation_builder.build_scene_render(scene_, view_layer_);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -23,8 +23,7 @@
#include "intern/builder/deg_builder_relations.h"
#include "intern/depsgraph.h"
namespace blender {
namespace deg {
namespace blender::deg {
ViewLayerBuilderPipeline::ViewLayerBuilderPipeline(::Depsgraph *graph)
: AbstractBuilderPipeline(graph)
@ -41,5 +40,4 @@ void ViewLayerBuilderPipeline::build_relations(DepsgraphRelationBuilder &relatio
relation_builder.build_view_layer(scene_, view_layer_, DEG_ID_LINKED_DIRECTLY);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -32,8 +32,7 @@
#include "BKE_global.h"
namespace blender {
namespace deg {
namespace blender::deg {
DepsgraphDebug::DepsgraphDebug()
: flags(G.debug), is_ever_evaluated(false), graph_evaluation_start_time_(0)
@ -98,5 +97,4 @@ string color_end()
return string(TRUECOLOR_ANSI_COLOR_FINISH);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -47,8 +47,7 @@ namespace dot = blender::dot;
/* ****************** */
/* Graphviz Debugging */
namespace blender {
namespace deg {
namespace blender::deg {
/* Only one should be enabled, defines whether graphviz nodes
* get colored by individual types or classes.
@ -510,8 +509,7 @@ static void deg_debug_graphviz_graph_relations(DotExportContext &ctx, const Deps
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg
void DEG_debug_relations_graphviz(const Depsgraph *graph, FILE *fp, const char *label)
{

View File

@ -38,8 +38,7 @@
namespace deg = blender::deg;
namespace blender {
namespace deg {
namespace blender::deg {
namespace {
struct DebugContext {
@ -149,8 +148,7 @@ void deg_debug_stats_gnuplot(const DebugContext &ctx)
}
} // namespace
} // namespace deg
} // namespace blender
} // namespace blender::deg
void DEG_debug_stats_gnuplot(const Depsgraph *depsgraph,
FILE *fp,

View File

@ -57,8 +57,7 @@
namespace deg = blender::deg;
namespace blender {
namespace deg {
namespace blender::deg {
Depsgraph::Depsgraph(Main *bmain, Scene *scene, ViewLayer *view_layer, eEvaluationMode mode)
: time_source(nullptr),
@ -263,8 +262,7 @@ ID *Depsgraph::get_cow_id(const ID *id_orig) const
return id_node->id_cow;
}
} // namespace deg
} // namespace blender
} // namespace blender::deg
/* **************** */
/* Public Graph API */

View File

@ -174,8 +174,7 @@ void DEG_add_forcefield_relations(DepsNodeHandle *handle,
/******************************** Internal API ********************************/
namespace blender {
namespace deg {
namespace blender::deg {
ListBase *build_effector_relations(Depsgraph *graph, Collection *collection)
{
@ -245,5 +244,4 @@ void clear_physics_relations(Depsgraph *graph)
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -44,8 +44,7 @@ namespace deg = blender::deg;
/* ************************ DEG TRAVERSAL ********************* */
namespace blender {
namespace deg {
namespace blender::deg {
namespace {
typedef deque<OperationNode *> TraversalQueue;
@ -265,8 +264,7 @@ void deg_foreach_id(const Depsgraph *depsgraph, DEGForeachIDCallback callback, v
}
} // namespace
} // namespace deg
} // namespace blender
} // namespace blender::deg
void DEG_foreach_dependent_ID(const Depsgraph *depsgraph,
const ID *id,

View File

@ -27,8 +27,7 @@
#include "intern/depsgraph.h"
namespace blender {
namespace deg {
namespace blender::deg {
using GraphRegistry = Map<Main *, VectorSet<Depsgraph *>>;
static GraphRegistry &get_graph_registry()
@ -65,5 +64,4 @@ Span<Depsgraph *> get_all_registered_graphs(Main *bmain)
return {};
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -28,8 +28,7 @@
#include "intern/depsgraph_type.h"
#include "intern/node/deg_node.h"
namespace blender {
namespace deg {
namespace blender::deg {
Relation::Relation(Node *from, Node *to, const char *description)
: from(from), to(to), name(description), flag(0)
@ -65,5 +64,4 @@ void Relation::unlink()
to->inlinks.remove_first_occurrence_and_reorder(this);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -73,8 +73,7 @@ namespace deg = blender::deg;
/* *********************** */
/* Update Tagging/Flushing */
namespace blender {
namespace deg {
namespace blender::deg {
namespace {
@ -676,8 +675,7 @@ void graph_id_tag_update(
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg
const char *DEG_update_tag_as_string(IDRecalcFlag flag)
{

View File

@ -29,8 +29,7 @@
namespace deg = blender::deg;
namespace blender {
namespace deg {
namespace blender::deg {
static DEG_EditorUpdateIDCb deg_editor_update_id_cb = nullptr;
static DEG_EditorUpdateSceneCb deg_editor_update_scene_cb = nullptr;
@ -49,8 +48,7 @@ void deg_editors_scene_update(const DEGEditorUpdateContext *update_ctx, bool upd
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg
/* Set callbacks which are being called when depsgraph changes. */
void DEG_editors_set_update_cb(DEG_EditorUpdateIDCb id_func, DEG_EditorUpdateSceneCb scene_func)

View File

@ -54,8 +54,7 @@
#include "intern/node/deg_node_operation.h"
#include "intern/node/deg_node_time.h"
namespace blender {
namespace deg {
namespace blender::deg {
namespace {
@ -416,5 +415,4 @@ void deg_evaluate_on_refresh(Depsgraph *graph)
graph->debug.end_graph_evaluation();
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -101,8 +101,7 @@
#include "intern/node/deg_node.h"
#include "intern/node/deg_node_id.h"
namespace blender {
namespace deg {
namespace blender::deg {
#define DEBUG_PRINT \
if (G.debug & G_DEBUG_DEPSGRAPH_EVAL) \
@ -1127,5 +1126,4 @@ bool deg_copy_on_write_is_needed(const ID_Type id_type)
return ID_TYPE_IS_COW(id_type);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -69,8 +69,7 @@
// catch usage of invalid state.
#undef INVALIDATE_ON_FLUSH
namespace blender {
namespace deg {
namespace blender::deg {
enum {
ID_STATE_NONE = 0,
@ -410,5 +409,4 @@ void deg_graph_clear_tags(Depsgraph *graph)
graph->time_source->tagged_for_update = false;
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -29,8 +29,7 @@
#include "DRW_engine.h"
namespace blender {
namespace deg {
namespace blender::deg {
RuntimeBackup::RuntimeBackup(const Depsgraph *depsgraph)
: have_backup(false),
@ -117,5 +116,4 @@ void RuntimeBackup::restore_to_id(ID *id)
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -32,8 +32,7 @@
#include "intern/depsgraph.h"
namespace blender {
namespace deg {
namespace blender::deg {
namespace {
@ -142,5 +141,4 @@ void AnimationBackup::restore_to_id(ID *id)
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -25,13 +25,11 @@
#include "DNA_modifier_types.h"
namespace blender {
namespace deg {
namespace blender::deg {
ModifierDataBackup::ModifierDataBackup(ModifierData *modifier_data)
: type(static_cast<ModifierType>(modifier_data->type)), runtime(modifier_data->runtime)
{
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -27,8 +27,7 @@
#include "BLI_utildefines.h"
namespace blender {
namespace deg {
namespace blender::deg {
MovieClipBackup::MovieClipBackup(const Depsgraph * /*depsgraph*/)
{
@ -59,5 +58,4 @@ void MovieClipBackup::restore_to_movieclip(MovieClip *movieclip)
reset();
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -32,8 +32,7 @@
#include "BKE_action.h"
#include "BKE_object.h"
namespace blender {
namespace deg {
namespace blender::deg {
ObjectRuntimeBackup::ObjectRuntimeBackup(const Depsgraph * /*depsgraph*/)
: base_flag(0), base_local_view_bits(0)
@ -180,5 +179,4 @@ void ObjectRuntimeBackup::restore_pose_channel_runtime_data(Object *object)
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -22,9 +22,3 @@
*/
#include "intern/eval/deg_eval_runtime_backup_pose.h"
namespace blender {
namespace deg {
}
} // namespace blender

View File

@ -28,8 +28,7 @@
#include "DNA_rigidbody_types.h"
#include "DNA_scene_types.h"
namespace blender {
namespace deg {
namespace blender::deg {
SceneBackup::SceneBackup(const Depsgraph *depsgraph) : sequencer_backup(depsgraph)
{
@ -86,5 +85,4 @@ void SceneBackup::restore_to_scene(Scene *scene)
reset();
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -25,8 +25,7 @@
#include "DNA_sequence_types.h"
namespace blender {
namespace deg {
namespace blender::deg {
SequenceBackup::SequenceBackup(const Depsgraph * /*depsgraph*/)
{
@ -56,5 +55,4 @@ bool SequenceBackup::isEmpty() const
return (scene_sound == nullptr);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -32,8 +32,7 @@
#include "SEQ_sequencer.h"
namespace blender {
namespace deg {
namespace blender::deg {
SequencerBackup::SequencerBackup(const Depsgraph *depsgraph) : depsgraph(depsgraph)
{
@ -74,5 +73,4 @@ void SequencerBackup::restore_to_scene(Scene *scene)
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -27,8 +27,7 @@
#include "DNA_sound_types.h"
namespace blender {
namespace deg {
namespace blender::deg {
SoundBackup::SoundBackup(const Depsgraph * /*depsgraph*/)
{
@ -62,5 +61,4 @@ void SoundBackup::restore_to_sound(bSound *sound)
reset();
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -33,8 +33,7 @@
#include <stdio.h>
namespace blender {
namespace deg {
namespace blender::deg {
VolumeBackup::VolumeBackup(const Depsgraph * /*depsgraph*/) : grids(nullptr)
{
@ -58,5 +57,4 @@ void VolumeBackup::restore_to_volume(Volume *volume)
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -32,8 +32,7 @@
#include "intern/node/deg_node_id.h"
#include "intern/node/deg_node_operation.h"
namespace blender {
namespace deg {
namespace blender::deg {
void deg_eval_stats_aggregate(Depsgraph *graph)
{
@ -55,5 +54,4 @@ void deg_eval_stats_aggregate(Depsgraph *graph)
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -36,8 +36,7 @@
#include "intern/node/deg_node_operation.h"
#include "intern/node/deg_node_time.h"
namespace blender {
namespace deg {
namespace blender::deg {
const char *nodeClassAsString(NodeClass node_class)
{
@ -340,5 +339,4 @@ void deg_register_base_depsnodes()
register_node_typeinfo(&DNTI_ID_REF);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -38,8 +38,7 @@
#include "intern/node/deg_node_id.h"
#include "intern/node/deg_node_operation.h"
namespace blender {
namespace deg {
namespace blender::deg {
/* *********** */
/* Outer Nodes */
@ -376,5 +375,4 @@ void deg_register_component_depsnodes()
register_node_typeinfo(&DNTI_SIMULATION);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -23,8 +23,7 @@
#include "intern/node/deg_node_factory.h"
namespace blender {
namespace deg {
namespace blender::deg {
/* Global type registry */
static DepsNodeFactory *node_typeinfo_registry[static_cast<int>(NodeType::NUM_TYPES)] = {nullptr};
@ -43,5 +42,4 @@ DepsNodeFactory *type_get_factory(const NodeType type)
return node_typeinfo_registry[type_as_int];
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -41,8 +41,7 @@
#include "intern/node/deg_node_factory.h"
#include "intern/node/deg_node_time.h"
namespace blender {
namespace deg {
namespace blender::deg {
const char *linkedStateAsString(eDepsNode_LinkedState_Type linked_state)
{
@ -213,5 +212,4 @@ IDComponentsMask IDNode::get_visible_components_mask() const
return result;
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -32,8 +32,7 @@
#include "intern/node/deg_node_factory.h"
#include "intern/node/deg_node_id.h"
namespace blender {
namespace deg {
namespace blender::deg {
const char *operationCodeAsString(OperationCode opcode)
{
@ -273,5 +272,4 @@ void deg_register_operation_depsnodes()
register_node_typeinfo(&DNTI_OPERATION);
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -28,8 +28,7 @@
#include "intern/depsgraph.h"
#include "intern/depsgraph_relation.h"
namespace blender {
namespace deg {
namespace blender::deg {
void TimeSourceNode::tag_update(Depsgraph * /*graph*/, eUpdateSource /*source*/)
{
@ -47,5 +46,4 @@ void TimeSourceNode::flush_update_tag(Depsgraph *graph)
}
}
} // namespace deg
} // namespace blender
} // namespace blender::deg

View File

@ -28,9 +28,7 @@ using namespace std;
#include "BKE_appdir.h"
namespace Freestyle {
namespace Config {
namespace Freestyle::Config {
Path *Path::_pInstance = nullptr;
Path::Path()
@ -85,6 +83,4 @@ string Path::getEnvVar(const string &iEnvVarName)
return value;
}
} // namespace Config
} /* namespace Freestyle */
} // namespace Freestyle::Config

View File

@ -21,9 +21,7 @@
#include "GeomUtils.h"
namespace Freestyle {
namespace GeomUtils {
namespace Freestyle::GeomUtils {
// This internal procedure is defined below.
bool intersect2dSegPoly(Vec2r *seg, Vec2r *poly, unsigned n);
@ -846,6 +844,4 @@ inline void fromCoordAToCoordB(const Vec3r &p, Vec3r &q, const real transform[4]
}
}
} // end of namespace GeomUtils
} /* namespace Freestyle */
} // namespace Freestyle::GeomUtils

View File

@ -33,11 +33,7 @@
#include "BLI_math.h"
namespace Freestyle {
namespace OGF {
namespace MatrixUtil {
namespace Freestyle::OGF::MatrixUtil {
static const double EPS = 0.00001;
static int MAX_ITER = 100;
@ -252,8 +248,4 @@ void semi_definite_symmetric_eigen(const double *mat, int n, double *eigen_vec,
//_________________________________________________________
} // namespace MatrixUtil
} // namespace OGF
} /* namespace Freestyle */
} // namespace Freestyle::OGF::MatrixUtil

View File

@ -32,9 +32,7 @@
#include "normal_cycle.h"
#include "matrix_util.h"
namespace Freestyle {
namespace OGF {
namespace Freestyle::OGF {
//_________________________________________________________
@ -88,6 +86,4 @@ void NormalCycle::end()
//_________________________________________________________
} // namespace OGF
} /* namespace Freestyle */
} // namespace Freestyle::OGF

View File

@ -25,9 +25,7 @@
#include "../view_map/Functions0D.h"
#include "../view_map/SteerableViewMap.h"
namespace Freestyle {
namespace Functions0D {
namespace Freestyle::Functions0D {
int DensityF0D::operator()(Interface0DIterator &iter)
{
@ -114,6 +112,4 @@ int GetViewMapGradientNormF0D::operator()(Interface0DIterator &iter)
return 0;
}
} // end of namespace Functions0D
} /* namespace Freestyle */
} // namespace Freestyle::Functions0D

View File

@ -24,10 +24,7 @@
#include "../view_map/SteerableViewMap.h"
namespace Freestyle {
// FIXME
namespace Functions1D {
namespace Freestyle::Functions1D {
int GetSteerableViewMapDensityF1D::operator()(Interface1D &inter)
{
@ -127,6 +124,4 @@ int GetViewMapGradientNormF1D::operator()(Interface1D &inter)
return 0;
}
} // namespace Functions1D
} /* namespace Freestyle */
} // namespace Freestyle::Functions1D

View File

@ -40,9 +40,7 @@
#include "IMB_imbuf.h"
#include "IMB_imbuf_types.h"
namespace Freestyle {
namespace StrokeShaders {
namespace Freestyle::StrokeShaders {
//
// Thickness modifiers
@ -697,6 +695,4 @@ int TipRemoverShader::shade(Stroke &stroke) const
return 0;
}
} // end of namespace StrokeShaders
} /* namespace Freestyle */
} // namespace Freestyle::StrokeShaders

View File

@ -26,9 +26,7 @@
#include "../system/TimeStamp.h"
namespace Freestyle {
namespace ContextFunctions {
namespace Freestyle::ContextFunctions {
unsigned GetTimeStampCF()
{
@ -78,6 +76,4 @@ FEdge *GetSelectedFEdgeCF()
return Canvas::getInstance()->selectedFEdge();
}
} // namespace ContextFunctions
} /* namespace Freestyle */
} // namespace Freestyle::ContextFunctions

View File

@ -24,9 +24,7 @@
#include "StringUtils.h"
#include "FreestyleConfig.h"
namespace Freestyle {
namespace StringUtils {
namespace Freestyle::StringUtils {
void getPathName(const string &path, const string &base, vector<string> &pathnames)
{
@ -57,6 +55,4 @@ void getPathName(const string &path, const string &base, vector<string> &pathnam
}
}
} // end of namespace StringUtils
} /* namespace Freestyle */
} // namespace Freestyle::StringUtils

View File

@ -26,9 +26,7 @@
using namespace std;
namespace Freestyle {
namespace Functions0D {
namespace Freestyle::Functions0D {
// Internal function
FEdge *getFEdge(Interface0D &it1, Interface0D &it2)
@ -388,6 +386,4 @@ int GetOccludeeF0D::operator()(Interface0DIterator &iter)
return 0;
}
} // end of namespace Functions0D
} /* namespace Freestyle */
} // namespace Freestyle::Functions0D

View File

@ -23,9 +23,7 @@
using namespace std;
namespace Freestyle {
namespace Functions1D {
namespace Freestyle::Functions1D {
int GetXF1D::operator()(Interface1D &inter)
{
@ -266,6 +264,4 @@ void getShapeF1D(Interface1D &inter, set<ViewShape *> &oShapes)
}
}
} // end of namespace Functions1D
} /* namespace Freestyle */
} // namespace Freestyle::Functions1D

View File

@ -50,9 +50,7 @@
} \
(void)0
namespace Freestyle {
namespace ViewMapIO {
namespace Freestyle::ViewMapIO {
namespace Internal {
@ -1307,6 +1305,4 @@ string getModelsPath()
} // namespace Options
} // End of namespace ViewMapIO
} /* namespace Freestyle */
} // namespace Freestyle::ViewMapIO