Skip to content

Commit

Permalink
Fix includes for stream-related symbols (openscad#5325)
Browse files Browse the repository at this point in the history
* Add missing <iostream> header for files using any of std::{cin,cout,cerr}

* Add missing <ostream> header for files using std::ostream.

* Include <sstream> for files using any of std::{stringstream,ostringstream}

* Include <ios> for files using std::{hex,dec,ios*}
  • Loading branch information
hzeller authored Sep 26, 2024
1 parent 2c90f30 commit 50ff1f8
Show file tree
Hide file tree
Showing 90 changed files with 93 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/LibraryInfo.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "LibraryInfo.h"
#include <sstream>
#include <glib.h>
#include <string>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions src/RenderStatistic.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*/


#include <iostream>
#include <memory>
#include <fstream>
#include "json/json.hpp"
Expand Down
1 change: 1 addition & 0 deletions src/core/AST.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "core/AST.h"
#include <ostream>
#include <memory>
#include <sstream>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/core/AST.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <ostream>
#include <string>
#include <memory>
#include <boost/filesystem.hpp>
Expand Down
1 change: 1 addition & 0 deletions src/core/Arguments.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*
*/

#include <ostream>
#include <memory>
#include "core/Arguments.h"
#include "core/Expression.h"
Expand Down
1 change: 1 addition & 0 deletions src/core/Assignment.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include "core/Assignment.h"
#include "core/customizer/Annotation.h"
#include "core/Expression.h"
#include <ostream>
#include <sstream>
#include <string>

Expand Down
1 change: 1 addition & 0 deletions src/core/Expression.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "utils/compiler_specific.h"
#include "core/Expression.h"
#include "core/Value.h"
#include <ostream>
#include <cstdint>
#include <cmath>
#include <cassert>
Expand Down
1 change: 1 addition & 0 deletions src/core/Expression.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <ostream>
#include <utility>
#include <cstddef>
#include <functional>
Expand Down
1 change: 1 addition & 0 deletions src/core/FunctionType.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <ostream>
#include "core/Value.h"
#include "core/Expression.h"
#include "core/FunctionType.h"
Expand Down
1 change: 1 addition & 0 deletions src/core/ImportNode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
#include "Feature.h"
#include "handle_dep.h"
#include "utils/boost-utils.h"
#include <ios>
#include <utility>
#include <memory>
#include <sys/types.h>
Expand Down
1 change: 1 addition & 0 deletions src/core/LocalScope.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <ostream>
#include <memory>
#include <cstddef>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/core/LocalScope.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include "core/Assignment.h"
#include <ostream>
#include <cstddef>
#include <unordered_map>
#include <memory>
Expand Down
1 change: 1 addition & 0 deletions src/core/ModuleInstantiation.cc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#include <ostream>
#include <memory>
#include <cstddef>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/core/ModuleInstantiation.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include "core/AST.h"
#include "core/LocalScope.h"
#include <ostream>
#include <memory>
#include <string>
#include <utility>
Expand Down
1 change: 1 addition & 0 deletions src/core/NodeDumper.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "core/NodeDumper.h"
#include "core/State.h"
#include "core/ModuleInstantiation.h"
#include <ostream>
#include <string>
#include <sstream>
#include <boost/regex.hpp>
Expand Down
1 change: 1 addition & 0 deletions src/core/NodeDumper.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <sstream>
#include <memory>
#include <string>
#include <unordered_map>
Expand Down
1 change: 1 addition & 0 deletions src/core/OffsetNode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "core/Parameters.h"
#include "core/Builtins.h"

#include <ios>
#include <utility>
#include <memory>
#include <sstream>
Expand Down
1 change: 1 addition & 0 deletions src/core/Parameters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*
*/

#include <sstream>
#include <memory>
#include <cstddef>
#include <set>
Expand Down
1 change: 1 addition & 0 deletions src/core/RotateExtrudeNode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "io/fileutils.h"
#include "core/Builtins.h"
#include "handle_dep.h"
#include <ios>
#include <utility>
#include <memory>
#include <cmath>
Expand Down
1 change: 1 addition & 0 deletions src/core/SourceFile.cc
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include "core/ScopeContext.h"
#include "core/parsersettings.h"
#include "core/StatCache.h"
#include <ostream>
#include <memory>
#include <boost/algorithm/string.hpp>
#include <boost/filesystem.hpp>
Expand Down
1 change: 1 addition & 0 deletions src/core/SourceFile.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <ostream>
#include <memory>
#include <string>
#include <unordered_map>
Expand Down
1 change: 1 addition & 0 deletions src/core/UserModule.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*
*/

#include <ostream>
#include <memory>
#include <vector>

Expand Down
1 change: 1 addition & 0 deletions src/core/UserModule.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <ostream>
#include <memory>
#include <string>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions src/core/Value.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
*
*/

#include <ostream>
#include <utility>
#include <cstdint>
#include <cassert>
Expand Down
1 change: 1 addition & 0 deletions src/core/customizer/Annotation.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include "core/customizer/Annotation.h"

#include <ostream>
#include <memory>
#include <string>
#include <utility>
Expand Down
1 change: 1 addition & 0 deletions src/core/customizer/Annotation.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <ostream>
#include <memory>
#include <string>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions src/core/function.cc
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "core/Expression.h"
#include "core/function.h"

#include <ostream>
#include <memory>
#include <cstddef>
#include <utility>
Expand Down
1 change: 1 addition & 0 deletions src/core/function.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "Feature.h"
#include "core/Value.h"

#include <ostream>
#include <memory>
#include <functional>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/core/node.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <ostream>
#include <memory>
#include <cstddef>
#include <utility>
Expand Down
1 change: 1 addition & 0 deletions src/geometry/Geometry.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "geometry/Geometry.h"
#include "utils/printutils.h"
#include <sstream>
#include <memory>
#include <boost/foreach.hpp>
#include <cstddef>
Expand Down
1 change: 1 addition & 0 deletions src/geometry/PolySet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "geometry/linalg.h"
#include "utils/printutils.h"
#include "geometry/Grid.h"
#include <sstream>
#include <memory>
#include <Eigen/LU>
#include <cstddef>
Expand Down
1 change: 1 addition & 0 deletions src/geometry/Polygon2d.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "geometry/Polygon2d.h"

#include <sstream>
#include <utility>
#include <cstddef>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/geometry/cgal/cgalutils-coplanar-faces-remesher.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Portions of this file are Copyright 2021 Google LLC, and licensed under GPL2+. See COPYING.
#pragma once

#include <iostream>
#include <CGAL/Surface_mesh.h>
#include <cstddef>
#include <unordered_map>
Expand Down
1 change: 1 addition & 0 deletions src/geometry/cgal/cgalutils-polyhedron.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "utils/printutils.h"
#include "geometry/Grid.h"

#include <ostream>
#include <memory>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>

Expand Down
1 change: 1 addition & 0 deletions src/geometry/manifold/ManifoldGeometry.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Portions of this file are Copyright 2023 Google LLC, and licensed under GPL2+. See COPYING.
#include "geometry/manifold/ManifoldGeometry.h"
#include "geometry/Polygon2d.h"
#include <sstream>
#include <utility>
#include <cstdint>
#include <manifold/cross_section.h>
Expand Down
1 change: 1 addition & 0 deletions src/geometry/roof_vd.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// This file is a part of openscad. Everything implied is implied.
// Author: Alexey Korepanov <[email protected]>

#include <ostream>
#include <cstdint>
#include <memory>

Expand Down
1 change: 1 addition & 0 deletions src/glview/OffscreenContextCGL.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "glview/OffscreenContextCGL.h"

#include <sstream>
#include <memory>
#include <cstddef>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/glview/OffscreenView.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "glview/OffscreenView.h"
#include "glview/system-gl.h"
#include <iostream>
#include <cstdint>
#include <cmath>
#include <cstdio>
Expand Down
1 change: 1 addition & 0 deletions src/glview/Renderer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "platform/PlatformUtils.h"
#include "glview/system-gl.h"

#include <sstream>
#include <Eigen/LU>
#include <fstream>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/glview/offscreen-old/OffscreenContextEGL.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
*/
#include "glview/offscreen-old/OffscreenContextEGL.h"

#include <iostream>
#include <cstdint>
#include <memory>
#include <EGL/egl.h>
Expand Down
1 change: 1 addition & 0 deletions src/glview/offscreen-old/OffscreenContextGLX.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@


#include "glview/system-gl.h"
#include <iostream>
#include <cstdint>
#include <memory>
#include <GL/gl.h>
Expand Down
1 change: 1 addition & 0 deletions src/glview/offscreen-old/OffscreenContextWGL.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
#include "glview/offscreen-old/OffscreenContextWGL.h"

#undef NOGDI
#include <iostream>
#include <cstdint>
#include <memory>
#include <windows.h>
Expand Down
1 change: 1 addition & 0 deletions src/gui/Animate.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "gui/Animate.h"
#include "utils/printutils.h"
#include "gui/MainWindow.h"
#include <iostream>
#include <boost/filesystem.hpp>
#include <QFormLayout>

Expand Down
1 change: 1 addition & 0 deletions src/gui/MainWindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
*/
#include <sstream>
#include <iostream>
#include <memory>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/gui/Measurement.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "gui/Measurement.h"

#include <sstream>
#include <string>

Measurement::Measurement()
Expand Down
1 change: 1 addition & 0 deletions src/gui/QGLView.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#include "glview/glew-utils.h"
#endif

#include <iostream>
#include <QApplication>
#include <QWheelEvent>
#include <QCheckBox>
Expand Down
1 change: 1 addition & 0 deletions src/gui/ViewportControl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "utils/printutils.h"
#include "gui/MainWindow.h"
#include "gui/QGLView.h"
#include <iostream>
#include <boost/filesystem.hpp>
#include <cfloat>
#include <QDoubleSpinBox>
Expand Down
2 changes: 2 additions & 0 deletions src/gui/input/HidApiInputDriver.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
* Public Domain.
*/

#include <ios>
#include <sstream>
#include <cstdint>
#include <bitset>
#include <boost/format.hpp>
Expand Down
1 change: 1 addition & 0 deletions src/gui/input/InputDriverManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
#include "gui/input/InputDriverEvent.h"
#include "gui/input/InputDriverManager.h"
#include "gui/MainWindow.h"
#include <sstream>
#include <QAction>
#include <QMenu>
#include <QApplication>
Expand Down
1 change: 1 addition & 0 deletions src/handle_dep.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "handle_dep.h"
#include "utils/printutils.h"
#include <iostream>
#include <string>
#include <sstream>
#include <cstdlib> // for system()
Expand Down
1 change: 1 addition & 0 deletions src/io/export.cc
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include "utils/printutils.h"
#include "geometry/Geometry.h"

#include <iostream>
#include <cstdint>
#include <memory>
#include <cstddef>
Expand Down
1 change: 1 addition & 0 deletions src/io/export_3mf_v1.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "geometry/manifold/ManifoldGeometry.h"
#endif

#include <ostream>
#include <cstdint>
#include <memory>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/io/export_3mf_v2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
#include "geometry/manifold/ManifoldGeometry.h"
#endif

#include <ostream>
#include <utility>
#include <cstdint>
#include <memory>
Expand Down
Loading

0 comments on commit 50ff1f8

Please sign in to comment.