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

RBF: fix initialization order of RBF members #438

Merged
merged 1 commit into from
Dec 15, 2023

Conversation

andrea-iob
Copy link
Member

Fixes the following warning:

In file included from /opt/bitpit/code/src/RBF/rbf.cpp:34:0: 
/opt/bitpit/code/src/RBF/rbf.hpp: In copy constructor ‘bitpit::RBFKernel::RBFKernel(const bitpit::RBFKernel&)’: /opt/bitpit/code/src/RBF/rbf.hpp:109:22: warning: ‘bitpit::RBFKernel::m_polyActiveBasis’ will be initialized after [-Wreorder]
     std::vector<int> m_polyActiveBasis;             /**< Active terms of linear polynomial, 0 is constant, i+1 the i-th system coordinate */
                      ^~~~~~~~~~~~~~~~~
/opt/bitpit/code/src/RBF/rbf.hpp:108:22: warning:   ‘bitpit::RBFKernel::LinearPolynomial bitpit::RBFKernel::m_polynomial’ [-Wreorder]
     LinearPolynomial m_polynomial;                  /**< Linear polynomial object */
                      ^~~~~~~~~~~~
/opt/bitpit/code/src/RBF/rbf.cpp:87:1: warning:   when initialized here [-Wreorder]
 RBFKernel::RBFKernel(const RBFKernel & other)

Fixes the following warning:

In file included from /opt/bitpit/code/src/RBF/rbf.cpp:34:0:
/opt/bitpit/code/src/RBF/rbf.hpp: In copy constructor ‘bitpit::RBFKernel::RBFKernel(const bitpit::RBFKernel&)’:
/opt/bitpit/code/src/RBF/rbf.hpp:109:22: warning: ‘bitpit::RBFKernel::m_polyActiveBasis’ will be initialized after [-Wreorder]
     std::vector<int> m_polyActiveBasis;             /**< Active terms of linear polynomial, 0 is constant, i+1 the i-th system coordinate */
                      ^~~~~~~~~~~~~~~~~
/opt/bitpit/code/src/RBF/rbf.hpp:108:22: warning:   ‘bitpit::RBFKernel::LinearPolynomial bitpit::RBFKernel::m_polynomial’ [-Wreorder]
     LinearPolynomial m_polynomial;                  /**< Linear polynomial object */
                      ^~~~~~~~~~~~
/opt/bitpit/code/src/RBF/rbf.cpp:87:1: warning:   when initialized here [-Wreorder]
 RBFKernel::RBFKernel(const RBFKernel & other)
@andrea-iob andrea-iob added this to the 1.9 milestone Dec 15, 2023
@andrea-iob andrea-iob self-assigned this Dec 15, 2023
@andrea-iob andrea-iob linked an issue Dec 15, 2023 that may be closed by this pull request
@andrea-iob andrea-iob merged commit 64e5d69 into master Dec 15, 2023
6 checks passed
@andrea-iob andrea-iob deleted the rbf.fix.initialization.order branch December 15, 2023 12:13
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.

Warnings in RBF module
2 participants