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

Cherry-picks for the 3.2 branch (future 3.2.2) - 6th batch #38832

Merged
merged 23 commits into from
May 20, 2020

Conversation

akien-mga
Copy link
Member

No description provided.

Faless and others added 4 commits May 18, 2020 16:40
Based on mix rate and expected latency.

(cherry picked from commit 245c179)
Each driver used to define the (same) project settings value, but the
setting names are not driver specific. Ovverriding is still possible via
platform tags.

(cherry picked from commit 90c7102)
mbrlabs and others added 5 commits May 18, 2020 16:40
The default `custom.py` can be created at the root of the Godot
repository to initialize any SCons build options via file which are
specific to user.

(cherry picked from commit a712e14)
This tool is originally from mongodb.

- Updated CPPSUFFIXES to use scons suffixes
- objective-c files will also be loaded into the compilation database where the compiler / tooling is available to compile the files.

Known limitations:

- This will not work with msvc as your compiler.

(cherry picked from commit 5a6f275)
There's a builtin `toolpath` option we can use for that, so no need to hack
around a custom `scons_site` path.

The script requires SCons 3.1.1 or later, so we enable it conditionally.

Follow-up to godotengine#32848.

(cherry picked from commit 22c718a)
@madmiraal
Copy link
Contributor

I think the C4724 warning is due to these, because edges.size() may be 0:

Vector3 b = _get_vertex(from_poly->edges[(pe + 1) % from_poly->edges.size()].point);

_get_vertex(begin_poly->edges[(i + 1) % begin_poly->edges.size()].point)

_get_vertex(p->edges[(i + 1) % p->edges.size()].point)

int prev_n = (p->prev_edge + 1) % p->edges.size();

int prev_n = (p->prev_edge + 1) % p->edges.size();

Geometry::get_closest_points_between_segments(p_from, p_to, _get_vertex(p.edges[i].point), _get_vertex(p.edges[(i + 1) % p.edges.size()].point), a, b);

An alternative is to use:
(i+1) == edges.size() ? 0 : i+1

@akien-mga
Copy link
Member Author

akien-mga commented May 19, 2020

@madmiraal But I'm preventing those to run with ERR_FAIL checks in f390749 already, so it should not be possible for those mods to be called with 0. I guess MSVC is not clever enough to see that the branch has an early return in our macros?

Note that I only guarded 4 of them as the last 2 are already guarded by the bound of their respective for loops: the loop shouldn't be entered at all if the size is 0.

madmiraal and others added 10 commits May 20, 2020 11:30
- Set options to be the same as travis builds,
  except use warnings=all instead of warnings=extra.
- Fail on warnings as per travis builds.

(cherry picked from commit 106221a)

Edited to set `werror=no` until we've fixed all warnings.
to allows to mutate the value while iterating over it.

(cherry picked from commit 97f9bbc)
Any C# file can be loaded as script and at load
time we don't yet know if it's actually meant to
be used as a script. As such, such an check can
result in a lot of false errors.

If the file is really meant to be used as a
script, an error would be printed later when
attempting to instantiate it any way.

(cherry picked from commit 38cd215)
(cherry picked from commit cc473b9)
@akien-mga
Copy link
Member Author

I changed the AppVeyor commit a520e03 to use werror=no for now. We should be able to see all remaining warnings in the CI log and see how to solve them. Apparently f390749 doesn't suffice to fix C4724.

@akien-mga akien-mga merged commit c5bb283 into godotengine:3.2 May 20, 2020
@madmiraal
Copy link
Contributor

It's definitely going to take more work. I've managed to extend f390749 to fix all the warnings in scene\3d\navigation.cpp, but now I get the same warnings in scene\2d\collision_polygon_2d.cpp:
https://ci.appveyor.com/project/madmiraal/godot/builds/33002769

Something else has changed to cause these warnings, but I can't work out what it is. The only thing that has changed in cowdata.h is 94f451e, but I don't see how that causes it, especially if it's not happening in master.

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

Successfully merging this pull request may close these issues.