Skip to content

Commit 16b657f

Browse files
committed
Merge branch 'v15' of github.com:Geode-solutions/OpenGeode into v15
2 parents c680417 + cb3d414 commit 16b657f

File tree

68 files changed

+305
-287
lines changed

Some content is hidden

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

68 files changed

+305
-287
lines changed

.vscode/settings.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"C_Cpp.default.cppStandard": "c++11",
2+
"C_Cpp.default.cppStandard": "c++17",
33
"C_Cpp.default.includePath": [
44
"${workspaceFolder}/include",
55
"${workspaceFolder}/build/opengeode",

bindings/python/src/common.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
#include <absl/container/fixed_array.h>
2929
#include <absl/container/inlined_vector.h>
3030
#include <absl/strings/string_view.h>
31-
#include <absl/types/optional.h>
3231
#include <absl/types/span.h>
3332

3433
namespace pybind11
@@ -78,10 +77,5 @@ namespace pybind11
7877
{
7978
};
8079

81-
template < typename T >
82-
struct type_caster< absl::optional< T > >
83-
: public optional_caster< absl::optional< T > >
84-
{
85-
};
8680
} // namespace detail
8781
} // namespace pybind11

bindings/python/src/geometry/basic_objects.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,10 +92,10 @@ namespace geode
9292
PYTHON_TRIANGLE( 2 );
9393
PYTHON_TRIANGLE( 3 )
9494
.def( "normal",
95-
static_cast< absl::optional< Vector3D > ( Triangle< 3 >::* )()
95+
static_cast< std::optional< Vector3D > ( Triangle< 3 >::* )()
9696
const >( &Triangle3D::normal ) )
9797
.def( "plane",
98-
static_cast< absl::optional< Plane > ( Triangle< 3 >::* )()
98+
static_cast< std::optional< Plane > ( Triangle< 3 >::* )()
9999
const >( &Triangle3D::plane ) );
100100

101101
pybind11::class_< Plane >( module, "Plane" )

include/geode/basic/cell_array.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
#pragma once
2525

26-
#include <absl/types/optional.h>
26+
#include <optional>
2727

2828
#include <geode/basic/common.h>
2929
#include <geode/basic/pimpl.h>
@@ -60,10 +60,10 @@ namespace geode
6060

6161
virtual CellIndices cell_indices( index_t index ) const = 0;
6262

63-
absl::optional< CellIndices > next_cell(
63+
std::optional< CellIndices > next_cell(
6464
const CellIndices& index, index_t direction ) const;
6565

66-
absl::optional< CellIndices > previous_cell(
66+
std::optional< CellIndices > previous_cell(
6767
const CellIndices& index, index_t direction ) const;
6868

6969
bool is_cell_on_border( const CellIndices& cell_indices ) const;

include/geode/basic/file.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323

2424
#pragma once
2525

26-
#include <absl/types/optional.h>
26+
#include <optional>
27+
2728
#include <absl/types/span.h>
2829

2930
#include <geode/basic/common.h>
@@ -44,9 +45,9 @@ namespace geode
4445
std::string opengeode_basic_api goto_keywords(
4546
std::ifstream& file, absl::Span< const absl::string_view > words );
4647

47-
absl::optional< std::string > opengeode_basic_api goto_keyword_if_it_exists(
48+
std::optional< std::string > opengeode_basic_api goto_keyword_if_it_exists(
4849
std::ifstream& file, absl::string_view word );
4950

50-
absl::optional< std::string > opengeode_basic_api next_keyword_if_it_exists(
51+
std::optional< std::string > opengeode_basic_api next_keyword_if_it_exists(
5152
std::ifstream& file, absl::string_view word );
5253
} // namespace geode

include/geode/geometry/basic_objects/triangle.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323

2424
#pragma once
2525

26+
#include <optional>
27+
2628
#include <geode/geometry/common.h>
2729
#include <geode/geometry/vector.h>
2830

@@ -59,20 +61,20 @@ namespace geode
5961

6062
Point< dimension > barycenter() const;
6163
template < index_t T = dimension >
62-
typename std::enable_if< T == 3, absl::optional< Vector3D > >::type
64+
typename std::enable_if< T == 3, std::optional< Vector3D > >::type
6365
normal() const;
6466
template < index_t T = dimension >
65-
typename std::enable_if< T == 3, absl::optional< Plane > >::type
67+
typename std::enable_if< T == 3, std::optional< Plane > >::type
6668
plane() const;
6769
template < index_t T = dimension >
68-
typename std::enable_if< T == 3, absl::optional< OwnerPlane > >::type
70+
typename std::enable_if< T == 3, std::optional< OwnerPlane > >::type
6971
owner_plane() const;
7072
template < index_t T = dimension >
71-
typename std::enable_if< T == 3, absl::optional< local_index_t > >::type
73+
typename std::enable_if< T == 3, std::optional< local_index_t > >::type
7274
pivot() const;
7375
template < index_t T = dimension >
7476
typename std::enable_if< T == 3,
75-
absl::optional< std::pair< local_index_t, Vector3D > > >::type
77+
std::optional< std::pair< local_index_t, Vector3D > > >::type
7678
pivot_and_normal() const;
7779
void set_point( index_t vertex, PointType point );
7880
const std::array< PointType, 3 >& vertices() const;

include/geode/geometry/intersection.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323

2424
#pragma once
2525

26+
#include <optional>
27+
2628
#include <absl/container/inlined_vector.h>
27-
#include <absl/types/optional.h>
2829

2930
#include <geode/geometry/common.h>
3031

@@ -98,9 +99,9 @@ namespace geode
9899
return has_intersection();
99100
}
100101

101-
absl::optional< Intersection > result;
102+
std::optional< Intersection > result;
102103
IntersectionType type;
103-
absl::optional< CorrectnessInfo< Intersection > > correctness;
104+
std::optional< CorrectnessInfo< Intersection > > correctness;
104105
};
105106

106107
/*!

include/geode/mesh/core/detail/facet_storage.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,15 +63,15 @@ namespace geode
6363
return facet_attribute_manager_;
6464
}
6565

66-
absl::optional< index_t > find_facet(
66+
std::optional< index_t > find_facet(
6767
TypedVertexCycle vertices ) const
6868
{
6969
const auto itr = facet_indices_.find( vertices );
7070
if( itr != facet_indices_.end() )
7171
{
7272
return itr->second;
7373
}
74-
return absl::nullopt;
74+
return std::nullopt;
7575
}
7676

7777
index_t add_facet( TypedVertexCycle vertices )

include/geode/mesh/core/geode/geode_hybrid_solid.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ namespace geode
138138
const PolyhedronFacetVertex& polyhedron_facet_vertex )
139139
const override;
140140

141-
absl::optional< index_t > get_polyhedron_adjacent(
141+
std::optional< index_t > get_polyhedron_adjacent(
142142
const PolyhedronFacet& polyhedron_facet ) const override;
143143

144144
PolyhedronEdgesVertices polyhedron_edges_vertices(

include/geode/mesh/core/geode/geode_polygonal_surface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ namespace geode
119119
local_index_t get_nb_polygon_vertices(
120120
index_t polygon_id ) const override;
121121

122-
absl::optional< index_t > get_polygon_adjacent(
122+
std::optional< index_t > get_polygon_adjacent(
123123
const PolygonEdge& polygon_edge ) const override;
124124

125125
private:

0 commit comments

Comments
 (0)