Skip to content

Commit

Permalink
Opt out of {platform/compiler}-dependent C++ snippets (#8851)
Browse files Browse the repository at this point in the history
  • Loading branch information
teh-cmc authored Jan 29, 2025
1 parent e0c706b commit 46bca88
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/snippets/all/archetypes/series_line_style.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ int main() {
rec.set_time_sequence("step", t);

rec.log("trig/sin", rerun::Scalar(sin(static_cast<double>(t) / 100.0)));
rec.log("trig/cos", rerun::Scalar(cos(static_cast<double>(t) / 100.0f)));
rec.log("trig/cos", rerun::Scalar(cos(static_cast<double>(t) / 100.0)));
}
}
2 changes: 1 addition & 1 deletion docs/snippets/all/archetypes/series_point_style.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@ int main() {
rec.set_time_sequence("step", t);

rec.log("trig/sin", rerun::Scalar(sin(static_cast<double>(t) / 10.0)));
rec.log("trig/cos", rerun::Scalar(cos(static_cast<double>(t) / 10.0f)));
rec.log("trig/cos", rerun::Scalar(cos(static_cast<double>(t) / 10.0)));
}
}
6 changes: 6 additions & 0 deletions docs/snippets/snippets.toml
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,12 @@ quick_start = [ # These examples don't have exactly the same implementation.
"archetypes/mesh3d_instancing" = [ # Python uses doubles
"py",
]
"archetypes/series_line_style" = [
"cpp", # somehow, C++ yields a different result, see <https://github.com/rerun-io/rerun/pull/8851>
]
"archetypes/series_point_style" = [
"cpp", # somehow, C++ yields a different result, see <https://github.com/rerun-io/rerun/pull/8851>
]

# `$config_dir` will be replaced with the absolute path of `docs/snippets`.
# Note that the snippet comparison tool will automatically run `/tests/assets/download_test_assets.py` before running the snippets.
Expand Down
2 changes: 1 addition & 1 deletion rerun_cpp/src/rerun/archetypes/series_line.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rerun_cpp/src/rerun/archetypes/series_point.hpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 46bca88

Please sign in to comment.