Skip to content

Conversation

@imikejackson
Copy link
Contributor

MSVC Compiler warnings due to possible template type usage and converting between them. This PR attempts to fix the warnings by fixing the code.

@imikejackson imikejackson force-pushed the topic/fix_misc_template_warnings branch 4 times, most recently from f29027b to 52d54f8 Compare December 1, 2025 19:52
@imikejackson imikejackson force-pushed the topic/fix_misc_template_warnings branch from 52d54f8 to 8ff0db0 Compare December 3, 2025 02:43

// Convert the misorientation to Degrees and store the value
currentMisalignmentList[j] = w * Constants::k_180OverPiD;
currentMisalignmentList[j] = static_cast<float32>(w * Constants::k_180OverPiF);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Here k_180OverPiF gets promoted to float64 due to w so I think keeping it as k_180OverPiD is ok.

}

void compute(usize start, usize end) const
void compute(size_t start, size_t end) const
Copy link
Collaborator

Choose a reason for hiding this comment

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

usize should be the same as size_t. Was there a warning here?

summationValue += value;
if constexpr(std::is_same_v<T, bool>)
{
summationValue = value == true ? true : false;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is the same as summationValue = value. But is this what we want to do here?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants