src/common/vector_utils.h


Log

Author Commit Date CI Message
Peter Kasting 2ce60b52 2022-05-05T08:23:07 Fixes for C++20 support. * The compiler grew smart enough to warn about value changes due to casting to float inside floatToNormalized(). Make it smart enough to realize this isn't a problem by using constexpr if. * Types on both sides of a comparison operator should be the same. * Structs with user-declared constructors are no longer aggregates. Provide a constructor and call it. * std::result_of<F(x)> is gone, use std::invoke_result<F, x> instead. Bug: chromium:1284275 Change-Id: I6487bb18c65837a6d7d2661f65e097dc6a7605b6 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3630478 Reviewed-by: Jamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Auto-Submit: Peter Kasting <pkasting@chromium.org>
Rafael Cintron 05a449a7 2018-06-20T18:08:04 Replace reinterpret_cast with safer or no cast When casting types to one another in C++, the weaker the cast, the better. This change replaces instances of reinterpret_cast with static_cast or no cast where it safe and correct to do so. BUG=angleproject:2683 Change-Id: I99c9033614a65282ae1d78cf0f4b80fabd75877a Reviewed-on: https://chromium-review.googlesource.com/1109396 Commit-Queue: Rafael Cintron <rafael.cintron@microsoft.com> Reviewed-by: Jamie Madill <jmadill@chromium.org>
Geoff Lang 93a540fc 2017-06-05T14:26:47 D3D11: Reset the TF binding offsets when glBeginTransformFeedback is called. BUG=angleproject:2051 Change-Id: I09e8548ef76b7d824743d06b0bba21633bc40a24 Reviewed-on: https://chromium-review.googlesource.com/523671 Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org>
Ivan Krasin fd8b469e 2017-01-17T11:20:26 Fix dot() signature to avoid an implicit copy constructor call. That also fixes the build with Clang ToT compiler. BUG=chromium:681912 Change-Id: I1449ee0f1f3f031d64af1a1f64f43808d2a8a1b1 Reviewed-on: https://chromium-review.googlesource.com/428903 Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
Corentin Wallez 922cbfcb 2016-11-25T16:23:18 common: Add a vector arithmetic helper classes Change-Id: I2f96baedf10d346eaa150bab04f8f6ca3ba573b9 Reviewed-on: https://chromium-review.googlesource.com/414272 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>