Skip to content

Commit

Permalink
Address some long-tail missing std::* includes (openscad#5346)
Browse files Browse the repository at this point in the history
* Include `<variant>` in files missing it.

Files using any of the symbols

  * `std::get_if`
  * `std::holds_alternative`
  * `std::visit`

...and don't yet include `<variant>`

* Include `<tuple>` in files missing it.

Files using any of the symbols

  * `std::tie`
  * `std::tuple`

...and don't yet include `<tuple>`

* Include `<system_error>` in files missing it.

Files using any of the symbols

  * `std::errc`

...and don't yet include `<system_error>`

* Include `<string>` in files missing it.

Files using any of the symbols

  * `std::getline`
  * `std::string`
  * `std::u32string`

...and don't yet include `<string>`

* Include `<stdexcept>` in files missing it.

Files using any of the symbols

  * `std::invalid_argument`
  * `std::out_of_range`
  * `std::runtime_error`

...and don't yet include `<stdexcept>`

* Include `<queue>` in files missing it.

Files using any of the symbols

  * `std::priority_queue`

...and don't yet include `<queue>`

* Include `<ostream>` in files missing it.

Files using any of the symbols

  * `std::endl`

...and don't yet include `<ostream>`

* Include `<optional>` in files missing it.

Files using any of the symbols

  * `std::optional`

...and don't yet include `<optional>`

* Include `<new>` in files missing it.

Files using any of the symbols

  * `std::bad_alloc`

...and don't yet include `<new>`
  • Loading branch information
hzeller authored Oct 1, 2024
1 parent 296b867 commit 99a93c4
Show file tree
Hide file tree
Showing 19 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/core/ContextMemoryManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "core/ContextMemoryManager.h"

#include <variant>
#include <cassert>
#include <utility>
#include <memory>
Expand Down
2 changes: 2 additions & 0 deletions src/core/SurfaceNode.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#include "handle_dep.h"
#include "lodepng/lodepng.h"

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

#include "core/NodeCache.h"
#include <tuple>
#include <memory>
#include <map>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/core/Value.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "core/Value.h"

#include <variant>
#include <limits>
#include <ostream>
#include <utility>
Expand Down
1 change: 1 addition & 0 deletions src/core/customizer/ParameterObject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
#include "core/Expression.h"
#include "core/SourceFile.h"

#include <variant>
#include <map>
#include <utility>
#include <memory>
Expand Down
1 change: 1 addition & 0 deletions src/geometry/cgal/cgalutils-applyops-hybrid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#ifdef ENABLE_CGAL

#include <queue>
#include <cassert>
#include <utility>
#include <memory>
Expand Down
1 change: 1 addition & 0 deletions src/geometry/manifold/manifoldutils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#ifdef ENABLE_CGAL
#include "geometry/cgal/cgalutils.h"
#include "geometry/cgal/CGALHybridPolyhedron.h"
#include <optional>
#include <cassert>
#include <map>
#include <set>
Expand Down
1 change: 1 addition & 0 deletions src/glview/ColorMap.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "utils/printutils.h"
#include "platform/PlatformUtils.h"

#include <stdexcept>
#include <set>
#include <list>
#include <utility>
Expand Down
1 change: 1 addition & 0 deletions src/glview/OffscreenView.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <stdexcept>
#include <cstdint>
#include <memory>
#include <string>
Expand Down
2 changes: 2 additions & 0 deletions src/glview/RenderSettings.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#include "glview/RenderSettings.h"
#include <stdexcept>
#include <string>
#include "utils/printutils.h"

std::string renderBackend3DToString(RenderBackend3D backend) {
Expand Down
1 change: 1 addition & 0 deletions src/gui/Preferences.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "gui/Preferences.h"

#include <tuple>
#include <cassert>
#include <list>
#include <QActionGroup>
Expand Down
1 change: 1 addition & 0 deletions src/gui/ScadApi.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "gui/ScadApi.h"

#include <string>
#include <QDir>
#include <QFileInfo>
#include <QRegularExpression>
Expand Down
1 change: 1 addition & 0 deletions src/gui/parameter/ParameterWidget.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
*/
#include "gui/parameter/ParameterWidget.h"

#include <stdexcept>
#include <cassert>
#include <map>
#include <set>
Expand Down
1 change: 1 addition & 0 deletions src/io/DxfData.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

#include "io/DxfData.h"

#include <stdexcept>
#include <memory>
#include <cmath>

Expand Down
1 change: 1 addition & 0 deletions src/io/import_off.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "geometry/PolySet.h"
#include "utils/printutils.h"
#include "core/AST.h"
#include <system_error>
#include <map>
#include <ios>
#include <cstdint>
Expand Down
1 change: 1 addition & 0 deletions src/openscad.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include "core/customizer/ParameterObject.h"
#include "core/customizer/ParameterSet.h"
#include "openscad_mimalloc.h"
#include <stdexcept>
#include <map>
#include <set>
#include <utility>
Expand Down
1 change: 1 addition & 0 deletions src/platform/PlatformUtils.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "platform/PlatformUtils.h"

#include <stdexcept>
#include <cstdint>
#include <cstdlib>
#include <iomanip>
Expand Down
1 change: 1 addition & 0 deletions src/utils/boost-utils.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "utils/boost-utils.h"
#include <stdexcept>
#include <cstdio>
#include <string>
#include <iostream>
Expand Down
1 change: 1 addition & 0 deletions src/utils/svg.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifdef ENABLE_CGAL
#include "utils/svg.h"
#include "geometry/cgal/cgalutils.h"
#include <ostream>
#include <sstream>
#include <boost/algorithm/string.hpp>
#include <boost/lexical_cast.hpp>
Expand Down

0 comments on commit 99a93c4

Please sign in to comment.