Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(OpenGeode): update to new warnings #133

Merged
merged 3 commits into from
Sep 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions bindings/python/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile bindings/python/requirements.in
# pip-compile --pre bindings/python/requirements.in
#
opengeode-core==15.*,>=15.2.5
opengeode-core==15.*,>=15.4.3rc1
# via -r bindings/python/requirements.in
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ namespace geode
}
Info() = default;

std::string authority_code() const
[[nodiscard]] std::string authority_code() const
{
return absl::StrCat( authority, ":", code );
}

std::string string() const
[[nodiscard]] std::string string() const
{
return absl::StrCat( "(", authority_code(), " -> ", name, ")" );
}
Expand All @@ -85,24 +85,26 @@ namespace geode
GeographicCoordinateSystem( AttributeManager& manager, Info info );
~GeographicCoordinateSystem();

static GeographicCoordinateSystem< dimension > create_from_attribute(
const AttributeCoordinateReferenceSystem< dimension >& crs,
AttributeManager& manager,
Info info );
[[nodiscard]] static GeographicCoordinateSystem< dimension >
create_from_attribute(
const AttributeCoordinateReferenceSystem< dimension >& crs,
AttributeManager& manager,
Info info );

static CRSType type_name_static()
[[nodiscard]] static CRSType type_name_static()
{
return CRSType{ "GeographicCoordinateSystem" };
}

CRSType type_name() const override
[[nodiscard]] CRSType type_name() const override
{
return type_name_static();
}

const Info& info() const;
[[nodiscard]] const Info& info() const;

static absl::FixedArray< Info > geographic_coordinate_systems();
[[nodiscard]] static absl::FixedArray< Info >
geographic_coordinate_systems();

void import_coordinates(
const GeographicCoordinateSystem< dimension >& crs );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ namespace geode
{
}

const uuid& create_fault_block();
[[nodiscard]] const uuid& create_fault_block();

void create_fault_block( uuid fault_block_id );

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ namespace geode
{
}

const uuid& create_fault();
[[nodiscard]] const uuid& create_fault();

const uuid& create_fault(
[[nodiscard]] const uuid& create_fault(
typename Fault< dimension >::FAULT_TYPE type );

void create_fault( uuid fault_id );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ namespace geode
{
}

const uuid& create_horizon();
[[nodiscard]] const uuid& create_horizon();

const uuid& create_horizon(
[[nodiscard]] const uuid& create_horizon(
typename Horizon< dimension >::HORIZON_TYPE type );

void create_horizon( uuid horizon_id );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace geode
{
}

const uuid& create_stratigraphic_unit();
[[nodiscard]] const uuid& create_stratigraphic_unit();

void create_stratigraphic_unit( uuid stratigraphic_unit_id );

Expand Down
11 changes: 6 additions & 5 deletions include/geode/geosciences/explicit/mixin/core/fault.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,25 +65,26 @@ namespace geode
Fault( Fault&& other ) noexcept;
~Fault();

static ComponentType component_type_static()
[[nodiscard]] static ComponentType component_type_static()
{
return ComponentType{ "Fault" };
}

ComponentType component_type() const final
[[nodiscard]] ComponentType component_type() const final
{
return component_type_static();
}

ComponentID component_id() const
[[nodiscard]] ComponentID component_id() const
{
return { this->component_type_static(), this->id() };
};

bool has_type() const;
[[nodiscard]] bool has_type() const;

FAULT_TYPE type() const;
[[nodiscard]] FAULT_TYPE type() const;

public:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers]

Suggested change
public:
Additional context

include/geode/geosciences/explicit/mixin/core/fault.hpp:51: previously declared here

    public:
    ^

Fault( FaultsKey ) : Fault() {}
Fault( FAULT_TYPE type, FaultsKey ) : Fault( type ) {}

Expand Down
9 changes: 5 additions & 4 deletions include/geode/geosciences/explicit/mixin/core/fault_block.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,23 @@ namespace geode
FaultBlock( FaultBlock&& other ) noexcept;
~FaultBlock();

static ComponentType component_type_static()
[[nodiscard]] static ComponentType component_type_static()
{
return ComponentType{ "FaultBlock" };
}

ComponentType component_type() const final
[[nodiscard]] ComponentType component_type() const final
{
return component_type_static();
}

ComponentID component_id() const
[[nodiscard]] ComponentID component_id() const
{
return { this->component_type_static(), this->id() };
};

FaultBlock( FaultBlocksKey ) : FaultBlock(){};
public:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers]

Suggested change
public:
Additional context

include/geode/geosciences/explicit/mixin/core/fault_block.hpp:51: previously declared here

    public:
    ^

FaultBlock( FaultBlocksKey ) : FaultBlock() {};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: all parameters should be named in a function [readability-named-parameter]

Suggested change
FaultBlock( FaultBlocksKey ) : FaultBlock() {};
FaultBlock( FaultBlocksKey /*unused*/) : FaultBlock() {};


void set_fault_block_name(
std::string_view name, FaultBlocksBuilderKey )
Expand Down
31 changes: 17 additions & 14 deletions include/geode/geosciences/explicit/mixin/core/fault_blocks.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ namespace geode
public:
~FaultBlockRangeBase();

bool operator!=( const FaultBlockRangeBase& /*unused*/ ) const;
[[nodiscard]] bool operator!=(
const FaultBlockRangeBase& /*unused*/ ) const;

void operator++();

Expand All @@ -70,29 +71,30 @@ namespace geode
public:
FaultBlockRange( const FaultBlocks& fault_blocks );

const FaultBlockRange& begin() const
[[nodiscard]] const FaultBlockRange& begin() const
{
return *this;
}

const FaultBlockRange& end() const
[[nodiscard]] const FaultBlockRange& end() const
{
return *this;
}

const FaultBlock< dimension >& operator*() const;
[[nodiscard]] const FaultBlock< dimension >& operator*() const;
};

public:
~FaultBlocks();

index_t nb_fault_blocks() const;
[[nodiscard]] index_t nb_fault_blocks() const;

bool has_fault_block( const uuid& id ) const;
[[nodiscard]] bool has_fault_block( const uuid& id ) const;

const FaultBlock< dimension >& fault_block( const uuid& id ) const;
[[nodiscard]] const FaultBlock< dimension >& fault_block(
const uuid& id ) const;

FaultBlockRange fault_blocks() const;
[[nodiscard]] FaultBlockRange fault_blocks() const;

void save_fault_blocks( std::string_view directory ) const;

Expand All @@ -109,31 +111,32 @@ namespace geode
public:
ModifiableFaultBlockRange( const FaultBlocks& fault_blocks );

const ModifiableFaultBlockRange& begin() const
[[nodiscard]] const ModifiableFaultBlockRange& begin() const
{
return *this;
}

const ModifiableFaultBlockRange& end() const
[[nodiscard]] const ModifiableFaultBlockRange& end() const
{
return *this;
}

FaultBlock< dimension >& operator*() const;
[[nodiscard]] FaultBlock< dimension >& operator*() const;
};

private:
const uuid& create_fault_block();
[[nodiscard]] const uuid& create_fault_block();

void create_fault_block( uuid fault_block_id );

void delete_fault_block( const FaultBlock< dimension >& fault_block );

void load_fault_blocks( std::string_view directory );

ModifiableFaultBlockRange modifiable_fault_blocks();
[[nodiscard]] ModifiableFaultBlockRange modifiable_fault_blocks();

FaultBlock< dimension >& modifiable_fault_block( const uuid& id );
[[nodiscard]] FaultBlock< dimension >& modifiable_fault_block(
const uuid& id );

private:
IMPLEMENTATION_MEMBER( impl_ );
Expand Down
31 changes: 16 additions & 15 deletions include/geode/geosciences/explicit/mixin/core/faults.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ namespace geode
public:
~FaultRangeBase();

bool operator!=( const FaultRangeBase& /*unused*/ ) const;
[[nodiscard]] bool operator!=(
const FaultRangeBase& /*unused*/ ) const;

void operator++();

Expand All @@ -70,29 +71,29 @@ namespace geode
public:
FaultRange( const Faults& faults );

const FaultRange& begin() const
[[nodiscard]] const FaultRange& begin() const
{
return *this;
}

const FaultRange& end() const
[[nodiscard]] const FaultRange& end() const
{
return *this;
}

const Fault< dimension >& operator*() const;
[[nodiscard]] const Fault< dimension >& operator*() const;
};

public:
~Faults();

index_t nb_faults() const;
[[nodiscard]] index_t nb_faults() const;

bool has_fault( const uuid& id ) const;
[[nodiscard]] bool has_fault( const uuid& id ) const;

const Fault< dimension >& fault( const uuid& id ) const;
[[nodiscard]] const Fault< dimension >& fault( const uuid& id ) const;

FaultRange faults() const;
[[nodiscard]] FaultRange faults() const;

void save_faults( std::string_view directory ) const;

Expand All @@ -109,23 +110,23 @@ namespace geode
public:
ModifiableFaultRange( const Faults& faults );

const ModifiableFaultRange& begin() const
[[nodiscard]] const ModifiableFaultRange& begin() const
{
return *this;
}

const ModifiableFaultRange& end() const
[[nodiscard]] const ModifiableFaultRange& end() const
{
return *this;
}

Fault< dimension >& operator*() const;
[[nodiscard]] Fault< dimension >& operator*() const;
};

private:
const uuid& create_fault();
[[nodiscard]] const uuid& create_fault();

const uuid& create_fault(
[[nodiscard]] const uuid& create_fault(
typename Fault< dimension >::FAULT_TYPE type );

void create_fault( uuid fault_id );
Expand All @@ -137,9 +138,9 @@ namespace geode

void load_faults( std::string_view directory );

ModifiableFaultRange modifiable_faults();
[[nodiscard]] ModifiableFaultRange modifiable_faults();

Fault< dimension >& modifiable_fault( const uuid& id );
[[nodiscard]] Fault< dimension >& modifiable_fault( const uuid& id );

private:
IMPLEMENTATION_MEMBER( impl_ );
Expand Down
11 changes: 6 additions & 5 deletions include/geode/geosciences/explicit/mixin/core/horizon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,25 +64,26 @@ namespace geode
Horizon( Horizon&& other ) noexcept;
~Horizon();

static ComponentType component_type_static()
[[nodiscard]] static ComponentType component_type_static()
{
return ComponentType{ "Horizon" };
}

ComponentType component_type() const final
[[nodiscard]] ComponentType component_type() const final
{
return component_type_static();
}

ComponentID component_id() const
[[nodiscard]] ComponentID component_id() const
{
return { this->component_type_static(), this->id() };
};

bool has_type() const;
[[nodiscard]] bool has_type() const;

HORIZON_TYPE type() const;
[[nodiscard]] HORIZON_TYPE type() const;

public:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning: redundant access specifier has the same accessibility as the previous access specifier [readability-redundant-access-specifiers]

Suggested change
public:
Additional context

include/geode/geosciences/explicit/mixin/core/horizon.hpp:51: previously declared here

    public:
    ^

Horizon( HorizonsKey ) : Horizon() {}
Horizon( HORIZON_TYPE type, HorizonsKey ) : Horizon( type ) {}

Expand Down
Loading
Loading