Skip to content

Commit 3bc4c0c

Browse files
authored
In implementation compilation unit: move corresponding header to top. (openscad#5327)
Move header foo.h within implementation foo.cc to the top. That ensures that the header at least is self-contained. This revealed, that the core/SurfaceNode.h header was missing an include of core/Value.h. This PR leaves out changing src/glview, as there are too many header dependencies that break, and should be addressed separately.
1 parent 0ae50c6 commit 3bc4c0c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+169
-84
lines changed

src/Feature.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include "Feature.h"
2+
13
#include <cstdio>
24
#include <iostream>
35
#include <sstream>
@@ -7,7 +9,6 @@
79
#include <boost/range/adaptor/transformed.hpp>
810
#include <utility>
911

10-
#include "Feature.h"
1112
#include "utils/printutils.h"
1213

1314
/**

src/FontCache.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
*
2525
*/
2626

27+
#include "FontCache.h"
28+
2729
#include <cstdint>
2830
#include <iostream>
2931
#include <vector>
@@ -33,7 +35,6 @@
3335
#include <string>
3436
#include <utility>
3537

36-
#include "FontCache.h"
3738
#include "platform/PlatformUtils.h"
3839
#include "utils/printutils.h"
3940
#include "utils/version_helper.h"

src/RenderStatistic.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
*/
2525

2626

27+
#include "RenderStatistic.h"
28+
2729
#include <iostream>
2830
#include <memory>
2931
#include <fstream>
@@ -46,7 +48,6 @@
4648
#include "geometry/manifold/manifoldutils.h"
4749
#endif // ENABLE_MANIFOLD
4850

49-
#include "RenderStatistic.h"
5051

5152
class GeometryList;
5253

src/core/Arguments.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@
2424
*
2525
*/
2626

27+
#include "core/Arguments.h"
28+
2729
#include <ostream>
2830
#include <memory>
29-
#include "core/Arguments.h"
3031
#include "core/Expression.h"
3132

3233
Arguments::Arguments(const AssignmentList& argument_expressions, const std::shared_ptr<const Context>& context) :

src/core/BuiltinContext.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
#include "core/BuiltinContext.h"
2+
13
#include <cmath>
24

35
#include "core/Builtins.h"
4-
#include "core/BuiltinContext.h"
56
#include "core/Expression.h"
67
#include "core/function.h"
78
#include "utils/printutils.h"

src/core/Builtins.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
#include "core/Builtins.h"
2+
13
#include <memory>
24
#include <string>
35
#include <vector>
46

5-
#include "core/Builtins.h"
67
#include "core/function.h"
78
#include "core/module.h"
89
#include "core/Expression.h"

src/core/Children.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@
2424
*
2525
*/
2626

27+
#include "core/Children.h"
28+
2729
#include <memory>
2830
#include <cstddef>
2931
#include <vector>
3032

31-
#include "core/Children.h"
3233
#include "core/ScopeContext.h"
3334

3435
std::shared_ptr<AbstractNode> Children::instantiate(const std::shared_ptr<AbstractNode> &target) const

src/core/Context.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,14 @@
2424
*
2525
*/
2626

27+
#include "core/Context.h"
28+
2729
#include <utility>
2830
#include <memory>
2931
#include <cstddef>
3032
#include <string>
3133
#include <vector>
3234

33-
#include "core/Context.h"
3435
#include "core/function.h"
3536
#include "utils/printutils.h"
3637

src/core/ContextFrame.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,13 @@
2424
*
2525
*/
2626

27+
#include "core/ContextFrame.h"
28+
2729
#include <utility>
2830
#include <cstddef>
2931
#include <string>
3032
#include <vector>
3133

32-
#include "core/ContextFrame.h"
3334

3435
ContextFrame::ContextFrame(EvaluationSession *session) :
3536
evaluation_session(session)

src/core/ContextMemoryManager.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
*
2525
*/
2626

27+
#include "core/ContextMemoryManager.h"
28+
2729
#include <utility>
2830
#include <memory>
2931
#include <deque>
@@ -32,7 +34,6 @@
3234
#include <vector>
3335

3436
#include "core/Context.h"
35-
#include "core/ContextMemoryManager.h"
3637
#include "core/Value.h"
3738

3839
/*

0 commit comments

Comments
 (0)