You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
implicit conversion from '_Complex double' to 'float' is not permitted in C++
Tensor::exp(Tensor::div(Tensor::scale(massesSq, -1.0j * _baseline), Tensor::scale(energies, 2.0)));
^
/home/runner/work/nuTens/nuTens/nuTens/propagator/propagator.cpp:30:101: warning: 2.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
Tensor::exp(Tensor::div(Tensor::scale(massesSq, -1.0j * _baseline), Tensor::scale(energies, 2.0)));
^
return std::cos(gamma);
^
/home/runner/work/nuTens/nuTens/tests/barger-propagator.hpp:84:35: note: end of the original
return std::cos(gamma);
^
/home/runner/work/nuTens/nuTens/tests/barger-propagator.hpp:86:13: note: clone 1 starts here
return std::cos(gamma);
^
elseif (alpha == 1 && beta == 0)
^
note: this fix will not be applied because it overlaps with another fix
/home/runner/work/nuTens/nuTens/tests/barger-propagator.hpp:120:27: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions]
float sin2Gamma = std::sin(2.0 * gamma);
^
/home/runner/work/nuTens/nuTens/tests/barger-propagator.hpp:120:36: warning: 2.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
float sin2Gamma = std::sin(2.0 * gamma);
^
/home/runner/work/nuTens/nuTens/tests/barger-propagator.hpp:121:24: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions]
float sinPhi = std::sin(dM2 * _baseline / (4.0 * energy));
^
/home/runner/work/nuTens/nuTens/tests/barger-propagator.hpp:121:52: warning: 4.0 is a magic number; consider replacing it with a named constant [cppcoreguidelines-avoid-magic-numbers,readability-magic-numbers]
float sinPhi = std::sin(dM2 * _baseline / (4.0 * energy));
^
/home/runner/work/nuTens/nuTens/tests/barger-propagator.hpp:124:24: warning: narrowing conversion from 'double' to 'float' [bugprone-narrowing-conversions,cppcoreguidelines-narrowing-conversions]
float onAxis = 1.0 - offAxis;
^
use auto when initializing with a template cast to avoid duplicating the type name
float m_i = masses.getValue<float>({0, i});
^~~~~
auto
Have any feedback or feature suggestions? Share it here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.