Skip to content

Fix v15/renaming const variables names #123

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

Merged
merged 40 commits into from
Jul 15, 2024

Conversation

BenoitTHEBAULT
Copy link
Contributor

Renaming global_epsilon to GLOBAL_EPSILON, global_angular_epsilon to GLOBAL_ANGULAR_EPSILON and all enum names (uppercase names).

BenPinet and others added 18 commits July 4, 2024 14:20
BREAKING CHANGE: absl::optional has been replaced by std::optional
…ith those of included projects.

BREAKING CHANGE: Added explicit constructors on all single-argument constructors.
…l-with-std-optional

fix(Optional): use std::optional
…s into fix/explicit_keyword_on_point_and_vector
BREAKING CHANGE: absl::string_view has been replaced by std::string_view
…:Geode-solutions/OpenGeode-Geosciences into fix_v15/solid_mesh_missing_include_and_bitsery_git_tag_change
…ng_include_and_bitsery_git_tag_change

fix(ABI): update ABI
…view-with-std

fix(StringView): use std::string_view
@github-actions github-actions bot changed the base branch from master to next July 11, 2024 13:33
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@@ -23,6 +23,8 @@

#pragma once

#include <optional>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'optional' file not found [clang-diagnostic-error]

#include <optional>
         ^

@@ -23,6 +23,8 @@

#pragma once

#include <optional>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'optional' file not found [clang-diagnostic-error]

#include <optional>
         ^

@@ -23,6 +23,8 @@

#pragma once

#include <optional>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'optional' file not found [clang-diagnostic-error]

#include <optional>
         ^

@@ -23,6 +23,8 @@

#pragma once

#include <optional>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'optional' file not found [clang-diagnostic-error]

#include <optional>
         ^

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

There were too many comments to post at once. Showing the first 25 out of 67. Check the log or trigger a new build to see more.

@@ -23,7 +23,7 @@

#pragma once

#include <absl/strings/string_view.h>
#include <string_view>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'string_view' file not found [clang-diagnostic-error]

#include <string_view>
         ^

@@ -24,10 +24,9 @@
#pragma once

#include <string>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'string' file not found [clang-diagnostic-error]

#include <string>
         ^

@@ -23,7 +23,7 @@

#pragma once

#include <absl/strings/string_view.h>
#include <string_view>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'string_view' file not found [clang-diagnostic-error]

#include <string_view>
         ^

@@ -24,10 +24,9 @@
#pragma once

#include <string>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'string' file not found [clang-diagnostic-error]

#include <string>
         ^

@@ -23,7 +23,7 @@

#pragma once

#include <absl/strings/string_view.h>
#include <string_view>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'string_view' file not found [clang-diagnostic-error]

#include <string_view>
         ^

@@ -24,7 +24,7 @@
#include <geode/geosciences/explicit/representation/io/cross_section_input.h>

#include <absl/strings/str_cat.h>
#include <absl/strings/string_view.h>
#include <string_view>

Copy link
Contributor

Choose a reason for hiding this comment

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

warning: included header string_view is not used directly [misc-include-cleaner]

Suggested change

@@ -24,10 +24,9 @@
#include <geode/geosciences/explicit/representation/io/cross_section_output.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'geode/geosciences/explicit/representation/io/cross_section_output.h' file not found [clang-diagnostic-error]

#include <geode/geosciences/explicit/representation/io/cross_section_output.h>
         ^

@@ -24,10 +24,9 @@
#include <geode/geosciences/explicit/representation/io/cross_section_output.h>

#include <string>
#include <string_view>
#include <vector>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: included header string_view is not used directly [misc-include-cleaner]

Suggested change
#include <vector>
#include <vector>

@@ -39,7 +38,7 @@
namespace geode
{
std::vector< std::string > save_cross_section(
const CrossSection& cross_section, absl::string_view filename )
const CrossSection& cross_section, std::string_view filename )
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 2 adjacent parameters of 'save_cross_section' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters]

        const CrossSection& cross_section, std::string_view filename )
        ^
Additional context

src/geode/geosciences/explicit/representation/io/cross_section_output.cpp:40: the first parameter in the range is 'cross_section'

        const CrossSection& cross_section, std::string_view filename )
                            ^

src/geode/geosciences/explicit/representation/io/cross_section_output.cpp:40: the last parameter in the range is 'filename'

        const CrossSection& cross_section, std::string_view filename )
                                                            ^

src/geode/geosciences/explicit/representation/io/cross_section_output.cpp:40: 'const int &' and 'int' parameters accept and bind the same kind of values

        const CrossSection& cross_section, std::string_view filename )
                                           ^

@@ -59,7 +58,7 @@
}

bool is_cross_section_saveable(
const CrossSection& cross_section, absl::string_view filename )
const CrossSection& cross_section, std::string_view filename )
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 2 adjacent parameters of 'is_cross_section_saveable' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters]

        const CrossSection& cross_section, std::string_view filename )
        ^
Additional context

src/geode/geosciences/explicit/representation/io/cross_section_output.cpp:60: the first parameter in the range is 'cross_section'

        const CrossSection& cross_section, std::string_view filename )
                            ^

src/geode/geosciences/explicit/representation/io/cross_section_output.cpp:60: the last parameter in the range is 'filename'

        const CrossSection& cross_section, std::string_view filename )
                                                            ^

src/geode/geosciences/explicit/representation/io/cross_section_output.cpp:60: 'const int &' and 'int' parameters accept and bind the same kind of values

        const CrossSection& cross_section, std::string_view filename )
                                           ^

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

There were too many comments to post at once. Showing the first 25 out of 55. Check the log or trigger a new build to see more.

@@ -23,13 +23,12 @@

#pragma once

#include <filesystem>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'filesystem' file not found [clang-diagnostic-error]

#include <filesystem>
         ^

@@ -23,8 +23,9 @@

#include <geode/geosciences/explicit/representation/io/structural_model_input.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'geode/geosciences/explicit/representation/io/structural_model_input.h' file not found [clang-diagnostic-error]

#include <geode/geosciences/explicit/representation/io/structural_model_input.h>
         ^

@@ -23,8 +23,9 @@

#include <geode/geosciences/explicit/representation/io/structural_model_input.h>

#include <string_view>

Copy link
Contributor

Choose a reason for hiding this comment

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

warning: included header string_view is not used directly [misc-include-cleaner]

Suggested change

@@ -24,10 +24,9 @@
#include <geode/geosciences/explicit/representation/io/structural_model_output.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'geode/geosciences/explicit/representation/io/structural_model_output.h' file not found [clang-diagnostic-error]

#include <geode/geosciences/explicit/representation/io/structural_model_output.h>
         ^

@@ -24,10 +24,9 @@
#include <geode/geosciences/explicit/representation/io/structural_model_output.h>

#include <string>
#include <string_view>
#include <vector>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: included header string_view is not used directly [misc-include-cleaner]

Suggested change
#include <vector>
#include <vector>

@@ -23,13 +23,13 @@

#include <geode/geosciences/implicit/representation/io/geode/geode_implicit_structural_model_output.h>

#include <filesystem>
#include <fstream>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: included header filesystem is not used directly [misc-include-cleaner]

Suggested change
#include <fstream>
#include <fstream>

@@ -23,13 +23,13 @@

#include <geode/geosciences/implicit/representation/io/geode/geode_implicit_structural_model_output.h>

#include <filesystem>
#include <fstream>
#include <string>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: included header fstream is not used directly [misc-include-cleaner]

Suggested change
#include <string>
#include <string>

@@ -23,8 +23,9 @@

#include <geode/geosciences/implicit/representation/io/horizons_stack_input.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'geode/geosciences/implicit/representation/io/horizons_stack_input.h' file not found [clang-diagnostic-error]

#include <geode/geosciences/implicit/representation/io/horizons_stack_input.h>
         ^

{
const auto input = detail::geode_object_input_reader<
HorizonsStackInputFactory< dimension > >( filename );
return input->is_loadable();
}

template HorizonsStack< 2 > opengeode_geosciences_implicit_api
load_horizons_stack( absl::string_view );
load_horizons_stack( std::string_view );
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'string_view' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

        load_horizons_stack( std::string_view );
                                  ^

template HorizonsStack< 3 > opengeode_geosciences_implicit_api
load_horizons_stack( absl::string_view );
load_horizons_stack( std::string_view );
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'string_view' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

        load_horizons_stack( std::string_view );
                                  ^

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

There were too many comments to post at once. Showing the first 25 out of 30. Check the log or trigger a new build to see more.

template HorizonsStackInput< 3 >::MissingFiles
opengeode_geosciences_implicit_api
check_horizons_stack_missing_files< 3 >( absl::string_view );
check_horizons_stack_missing_files< 3 >( std::string_view );
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'string_view' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

            check_horizons_stack_missing_files< 3 >( std::string_view );
                                                          ^

template bool opengeode_geosciences_implicit_api
is_horizons_stack_loadable< 3 >( absl::string_view );
is_horizons_stack_loadable< 3 >( std::string_view );
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: variable 'string_view' is non-const and globally accessible, consider making it const [cppcoreguidelines-avoid-non-const-global-variables]

        is_horizons_stack_loadable< 3 >( std::string_view );
                                              ^

@@ -24,10 +24,9 @@
#include <geode/geosciences/implicit/representation/io/horizons_stack_output.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'geode/geosciences/implicit/representation/io/horizons_stack_output.h' file not found [clang-diagnostic-error]

#include <geode/geosciences/implicit/representation/io/horizons_stack_output.h>
         ^

@@ -24,10 +24,9 @@
#include <geode/geosciences/implicit/representation/io/horizons_stack_output.h>

#include <string>
#include <string_view>
#include <vector>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: included header string_view is not used directly [misc-include-cleaner]

Suggested change
#include <vector>
#include <vector>

@@ -39,7 +38,7 @@
template < index_t dimension >
std::vector< std::string > save_horizons_stack(
const HorizonsStack< dimension >& horizons_stack,
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 2 adjacent parameters of 'save_horizons_stack' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters]

        const HorizonsStack< dimension >& horizons_stack,
        ^
Additional context

src/geode/geosciences/implicit/representation/io/horizons_stack_output.cpp:39: the first parameter in the range is 'horizons_stack'

        const HorizonsStack< dimension >& horizons_stack,
                                          ^

src/geode/geosciences/implicit/representation/io/horizons_stack_output.cpp:40: the last parameter in the range is 'filename'

        std::string_view filename )
                         ^

src/geode/geosciences/implicit/representation/io/horizons_stack_output.cpp:40: 'const int &' and 'int' parameters accept and bind the same kind of values

        std::string_view filename )
        ^

@@ -24,10 +24,9 @@
#include <geode/geosciences/implicit/representation/io/stratigraphic_model_output.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'geode/geosciences/implicit/representation/io/stratigraphic_model_output.h' file not found [clang-diagnostic-error]

#include <geode/geosciences/implicit/representation/io/stratigraphic_model_output.h>
         ^

@@ -24,10 +24,9 @@
#include <geode/geosciences/implicit/representation/io/stratigraphic_model_output.h>

#include <string>
#include <string_view>
#include <vector>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: included header string_view is not used directly [misc-include-cleaner]

Suggested change
#include <vector>
#include <vector>

@@ -42,7 +41,7 @@
{
std::vector< std::string > save_stratigraphic_model(
const StratigraphicModel& stratigraphic_model,
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 2 adjacent parameters of 'save_stratigraphic_model' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters]

        const StratigraphicModel& stratigraphic_model,
        ^
Additional context

src/geode/geosciences/implicit/representation/io/stratigraphic_model_output.cpp:42: the first parameter in the range is 'stratigraphic_model'

        const StratigraphicModel& stratigraphic_model,
                                  ^

src/geode/geosciences/implicit/representation/io/stratigraphic_model_output.cpp:43: the last parameter in the range is 'filename'

        std::string_view filename )
                         ^

src/geode/geosciences/implicit/representation/io/stratigraphic_model_output.cpp:43: 'const int &' and 'int' parameters accept and bind the same kind of values

        std::string_view filename )
        ^

@@ -70,7 +69,7 @@

bool is_stratigraphic_model_saveable(
const StratigraphicModel& stratigraphic_model,
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 2 adjacent parameters of 'is_stratigraphic_model_saveable' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters]

        const StratigraphicModel& stratigraphic_model,
        ^
Additional context

src/geode/geosciences/implicit/representation/io/stratigraphic_model_output.cpp:70: the first parameter in the range is 'stratigraphic_model'

        const StratigraphicModel& stratigraphic_model,
                                  ^

src/geode/geosciences/implicit/representation/io/stratigraphic_model_output.cpp:71: the last parameter in the range is 'filename'

        std::string_view filename )
                         ^

src/geode/geosciences/implicit/representation/io/stratigraphic_model_output.cpp:71: 'const int &' and 'int' parameters accept and bind the same kind of values

        std::string_view filename )
        ^

@@ -23,8 +23,9 @@

#include <geode/geosciences/implicit/representation/io/stratigraphic_section_input.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'geode/geosciences/implicit/representation/io/stratigraphic_section_input.h' file not found [clang-diagnostic-error]

#include <geode/geosciences/implicit/representation/io/stratigraphic_section_input.h>
         ^

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

@@ -23,8 +23,9 @@

#include <geode/geosciences/implicit/representation/io/stratigraphic_section_input.h>

#include <string_view>

Copy link
Contributor

Choose a reason for hiding this comment

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

warning: included header string_view is not used directly [misc-include-cleaner]

Suggested change

@@ -24,10 +24,9 @@
#include <geode/geosciences/implicit/representation/io/stratigraphic_section_output.h>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 'geode/geosciences/implicit/representation/io/stratigraphic_section_output.h' file not found [clang-diagnostic-error]

#include <geode/geosciences/implicit/representation/io/stratigraphic_section_output.h>
         ^

@@ -24,10 +24,9 @@
#include <geode/geosciences/implicit/representation/io/stratigraphic_section_output.h>

#include <string>
#include <string_view>
#include <vector>
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: included header string_view is not used directly [misc-include-cleaner]

Suggested change
#include <vector>
#include <vector>

@@ -42,7 +41,7 @@
{
std::vector< std::string > save_stratigraphic_section(
const StratigraphicSection& stratigraphic_section,
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 2 adjacent parameters of 'save_stratigraphic_section' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters]

        const StratigraphicSection& stratigraphic_section,
        ^
Additional context

src/geode/geosciences/implicit/representation/io/stratigraphic_section_output.cpp:42: the first parameter in the range is 'stratigraphic_section'

        const StratigraphicSection& stratigraphic_section,
                                    ^

src/geode/geosciences/implicit/representation/io/stratigraphic_section_output.cpp:43: the last parameter in the range is 'filename'

        std::string_view filename )
                         ^

src/geode/geosciences/implicit/representation/io/stratigraphic_section_output.cpp:43: 'const int &' and 'int' parameters accept and bind the same kind of values

        std::string_view filename )
        ^

@@ -70,7 +69,7 @@

bool is_stratigraphic_section_saveable(
const StratigraphicSection& stratigraphic_section,
Copy link
Contributor

Choose a reason for hiding this comment

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

warning: 2 adjacent parameters of 'is_stratigraphic_section_saveable' of similar type are easily swapped by mistake [bugprone-easily-swappable-parameters]

        const StratigraphicSection& stratigraphic_section,
        ^
Additional context

src/geode/geosciences/implicit/representation/io/stratigraphic_section_output.cpp:70: the first parameter in the range is 'stratigraphic_section'

        const StratigraphicSection& stratigraphic_section,
                                    ^

src/geode/geosciences/implicit/representation/io/stratigraphic_section_output.cpp:71: the last parameter in the range is 'filename'

        std::string_view filename )
                         ^

src/geode/geosciences/implicit/representation/io/stratigraphic_section_output.cpp:71: 'const int &' and 'int' parameters accept and bind the same kind of values

        std::string_view filename )
        ^

@panquez panquez merged commit 5b3be66 into next Jul 15, 2024
19 checks passed
@panquez panquez deleted the fix_v15/rename_global_epsilon_to_GLOBAL_EPSILON branch July 15, 2024 16:15
@panquez
Copy link
Member

panquez commented Jul 16, 2024

🎉 This PR is included in version 8.0.0-rc.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@panquez
Copy link
Member

panquez commented Jul 17, 2024

🎉 This PR is included in version 8.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants