Skip to content

Commit 9b17d50

Browse files
authored
Merge pull request #965 from Geode-solutions/fix/replace-absl-string-view-with-std
fix(StringView): use std::string_view
2 parents 97c1eb5 + 062b3bf commit 9b17d50

File tree

241 files changed

+935
-965
lines changed

Some content is hidden

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

241 files changed

+935
-965
lines changed

bindings/python/src/basic/attribute_manager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,21 +38,21 @@ namespace geode
3838
absl::StrCat( "find_or_create_attribute_constant_", suffix );
3939
manager.def( constant_suffix.c_str(),
4040
static_cast< std::shared_ptr< ConstantAttribute< type > > (
41-
AttributeManager::* )( absl::string_view, type ) >(
41+
AttributeManager::* )( std::string_view, type ) >(
4242
&AttributeManager::find_or_create_attribute< ConstantAttribute,
4343
type > ) );
4444
const auto variable_suffix =
4545
absl::StrCat( "find_or_create_attribute_variable_", suffix );
4646
manager.def( variable_suffix.c_str(),
4747
static_cast< std::shared_ptr< VariableAttribute< type > > (
48-
AttributeManager::* )( absl::string_view, type ) >(
48+
AttributeManager::* )( std::string_view, type ) >(
4949
&AttributeManager::find_or_create_attribute< VariableAttribute,
5050
type > ) );
5151
const auto sparse_suffix =
5252
absl::StrCat( "find_or_create_attribute_sparse_", suffix );
5353
manager.def( sparse_suffix.c_str(),
5454
static_cast< std::shared_ptr< SparseAttribute< type > > (
55-
AttributeManager::* )( absl::string_view, type ) >(
55+
AttributeManager::* )( std::string_view, type ) >(
5656
&AttributeManager::find_or_create_attribute< SparseAttribute,
5757
type > ) );
5858
}

bindings/python/src/basic/uuid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace geode
3131
{
3232
pybind11::class_< uuid >( module, "uuid" )
3333
.def( pybind11::init<>() )
34-
.def( pybind11::init< absl::string_view >() )
34+
.def( pybind11::init< std::string_view >() )
3535
.def( "string", &uuid::string );
3636
}
3737
} // namespace geode

bindings/python/src/common.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
#include <absl/container/fixed_array.h>
2929
#include <absl/container/inlined_vector.h>
30-
#include <absl/strings/string_view.h>
3130
#include <absl/types/span.h>
3231

3332
namespace pybind11
@@ -70,11 +69,5 @@ namespace pybind11
7069

7170
std::vector< typename std::remove_const< Type >::type > cpp_;
7271
};
73-
74-
template <>
75-
struct type_caster< absl::string_view >
76-
: string_caster< absl::string_view, true >
77-
{
78-
};
7972
} // namespace detail
8073
} // namespace pybind11

bindings/python/src/mesh/builder/crs_manager_builder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
CoordinateReferenceSystemManager< dimension >& >() ) \
3737
.def( "register_coordinate_reference_system", \
3838
[]( CoordinateReferenceSystemManagerBuilder< dimension >& manager, \
39-
absl::string_view name, \
39+
std::string_view name, \
4040
std::shared_ptr< CoordinateReferenceSystem< dimension > >& \
4141
crs ) { \
4242
manager.register_coordinate_reference_system( \

bindings/python/src/mesh/io/edged_curve.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"load_edged_curve" + std::to_string( dimension ) + "D"; \
4040
module.def( load##dimension.c_str(), \
4141
static_cast< std::unique_ptr< EdgedCurve< dimension > > ( * )( \
42-
absl::string_view ) >( &load_edged_curve< dimension > ) ); \
42+
std::string_view ) >( &load_edged_curve< dimension > ) ); \
4343
const auto check##dimension = \
4444
"check_edged_curve_missing_files" + std::to_string( dimension ) + "D"; \
4545
module.def( check##dimension.c_str(), \

bindings/python/src/mesh/io/graph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace geode
3535
{
3636
module.def( "save_graph", &save_graph );
3737
module.def( "load_graph",
38-
static_cast< std::unique_ptr< Graph > ( * )( absl::string_view ) >(
38+
static_cast< std::unique_ptr< Graph > ( * )( std::string_view ) >(
3939
&load_graph ) );
4040
module.def( "check_graph_missing_files", &check_graph_missing_files );
4141
module.def( "is_graph_loadable", &is_graph_loadable );

bindings/python/src/mesh/io/hybrid_solid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"load_hybrid_solid" + std::to_string( dimension ) + "D"; \
4040
module.def( load##dimension.c_str(), \
4141
static_cast< std::unique_ptr< HybridSolid< dimension > > ( * )( \
42-
absl::string_view ) >( &load_hybrid_solid< dimension > ) ); \
42+
std::string_view ) >( &load_hybrid_solid< dimension > ) ); \
4343
const auto check##dimension = "check_hybrid_solid_missing_files" \
4444
+ std::to_string( dimension ) + "D"; \
4545
module.def( check##dimension.c_str(), \

bindings/python/src/mesh/io/light_regular_grid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"load_light_regular_grid" + std::to_string( dimension ) + "D"; \
4141
module.def( load##dimension.c_str(), \
4242
static_cast< LightRegularGrid< dimension > ( * )( \
43-
absl::string_view ) >( &load_light_regular_grid< dimension > ) ); \
43+
std::string_view ) >( &load_light_regular_grid< dimension > ) ); \
4444
const auto check##dimension = "check_light_regular_grid_missing_files" \
4545
+ std::to_string( dimension ) + "D"; \
4646
module.def( check##dimension.c_str(), \

bindings/python/src/mesh/io/point_set.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
"load_point_set" + std::to_string( dimension ) + "D"; \
4040
module.def( load##dimension.c_str(), \
4141
static_cast< std::unique_ptr< PointSet< dimension > > ( * )( \
42-
absl::string_view ) >( &load_point_set< dimension > ) ); \
42+
std::string_view ) >( &load_point_set< dimension > ) ); \
4343
const auto check##dimension = \
4444
"check_point_set_missing_files" + std::to_string( dimension ) + "D"; \
4545
module.def( check##dimension.c_str(), \

bindings/python/src/mesh/io/polygonal_surface.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"load_polygonal_surface" + std::to_string( dimension ) + "D"; \
4141
module.def( load##dimension.c_str(), \
4242
static_cast< std::unique_ptr< PolygonalSurface< dimension > > ( * )( \
43-
absl::string_view ) >( &load_polygonal_surface< dimension > ) ); \
43+
std::string_view ) >( &load_polygonal_surface< dimension > ) ); \
4444
const auto check##dimension = "check_polygonal_surface_missing_files" \
4545
+ std::to_string( dimension ) + "D"; \
4646
module.def( check##dimension.c_str(), \

0 commit comments

Comments
 (0)