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

Misc,TensorVis,VectorVis: core logging changes #248

Merged
merged 1 commit into from
Jan 14, 2025

Conversation

martinfalk
Copy link
Contributor

reflects latest core changes related to logging

Copy link

Cpp-Linter Report ⚠️

Some files did not pass the configured checks!

clang-tidy (v17.0.6) reports: 3 concern(s)
  • misc/devtools/include/inviwo/devtools/processors/eventlogger.h:32:10: error: [clang-diagnostic-error]

    'inviwo/devtools/devtoolsmoduledefine.h' file not found

       32 | #include <inviwo/devtools/devtoolsmoduledefine.h>
          |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  • tensorvis/tensorvisbase/src/processors/invariantspacefilter.cpp:90:16: warning: [google-readability-casting]

    C-style casts are discouraged; use static_cast

       90 |               (float(numberOfFilteredTensors) / float(numberOfElements)) * 100.f,
          |                ^~~~~
          |                static_cast<float>
  • tensorvis/tensorvisbase/src/processors/invariantspacefilter.cpp:90:49: warning: [google-readability-casting]

    C-style casts are discouraged; use static_cast

       90 |               (float(numberOfFilteredTensors) / float(numberOfElements)) * 100.f,
          |                                                 ^~~~~
          |                                                 static_cast<float>

Have any feedback or feature suggestions? Share it here.

Copy link

@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.

Cpp-linter Review

Used clang-tidy v17.0.6

Click here for the full clang-tidy patch
diff --git a/tensorvis/tensorvisbase/src/processors/invariantspacefilter.cpp b/tensorvis/tensorvisbase/src/processors/invariantspacefilter.cpp
index cf66a59..17c935e 100644
--- a/tensorvis/tensorvisbase/src/processors/invariantspacefilter.cpp
+++ b/tensorvis/tensorvisbase/src/processors/invariantspacefilter.cpp
@@ -90 +90,2 @@ void InvariantSpaceFilter::process() {
-              (float(numberOfFilteredTensors) / float(numberOfElements)) * 100.f,
+              (static_cast<float>(numberOfFilteredTensors) / static_cast<float>(numberOfElements)) *
+                  100.f,

Have any feedback or feature suggestions? Share it here.

<< "% filtered (" << std::to_string(numberOfFilteredTensors) << " out of "
<< std::to_string(numberOfElements) << ").");
log::info("{}% filtered ({} out of {})",
(float(numberOfFilteredTensors) / float(numberOfElements)) * 100.f,

Choose a reason for hiding this comment

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

clang-tidy diagnostics

Suggested change
(float(numberOfFilteredTensors) / float(numberOfElements)) * 100.f,
(static_cast<float>(numberOfFilteredTensors) / static_cast<float>(numberOfElements)) *
100.f,

@petersteneteg petersteneteg merged commit f035dd7 into master Jan 14, 2025
14 checks passed
@petersteneteg petersteneteg deleted the feature/logging branch January 14, 2025 13:00
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