Skip to content

Bugfix/math missing static#89

Merged
finger563 merged 2 commits intomainfrom
bugfix/math-missing-static
Jul 13, 2023
Merged

Bugfix/math missing static#89
finger563 merged 2 commits intomainfrom
bugfix/math-missing-static

Conversation

@finger563
Copy link
Contributor

Description

  • Added missing static keyword to global functions defined in fast_math.hpp
  • Updated static funtions in fast_math and vector2d to have [[maybe_unused]] attribute to prevent spurious compiler warnings if they are not used.
  • Rebuilt docs

Motivation and Context

In more complex projects where you may include the fast_math header in multiple places, you will end up getting multiple definition errors for the symbols defined in fast_math.hpp. This fixes that issue. It also fixes the benign (but annoying) spurious warnings about functions defined but not used such as in the screenshot below.

CleanShot 2023-07-13 at 10 14 00

How has this been tested?

Building the math example.

Screenshots (if appropriate, e.g. schematic, board, console logs, lab pictures):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update
  • Hardware (schematic, board, system design) change
  • Software change

Checklist:

  • My change requires a change to the documentation.
  • I have added / updated the documentation related to this change via either README or WIKI

Software

  • I have added tests to cover my changes.
  • I have updated the .github/workflows/build.yml file to add my new test to the automated cloud build github action.
  • All new and existing tests passed.
  • My code follows the code style of this project.

* Added missing `static` keyword to global functions defined in fast_math.hpp
* Updated static funtions in fast_math and vector2d to have [[maybe_unused]] attribute to prevent spurious compiler warnings if they are not used.
@finger563 finger563 self-assigned this Jul 13, 2023
@finger563 finger563 added math bug Something isn't working labels Jul 13, 2023
@finger563 finger563 merged commit 3322a71 into main Jul 13, 2023
@finger563 finger563 deleted the bugfix/math-missing-static branch July 13, 2023 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working math

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant