mirror of
https://github.com/godotengine/godot.git
synced 2024-11-13 23:52:41 +00:00
Merge pull request #98867 from akien-mga/3.3-ci-build-warning-fixes
[3.3] Misc. build and warning fixes to pass CI and compile with recent SCons and GCC/Clang
This commit is contained in:
commit
01bf239576
15
.github/workflows/android_builds.yml
vendored
15
.github/workflows/android_builds.yml
vendored
@ -14,7 +14,7 @@ jobs:
|
||||
name: Template (target=release, tools=no)
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
||||
- name: Make apt sources.list use the default Ubuntu repositories
|
||||
@ -23,15 +23,16 @@ jobs:
|
||||
sudo cp -f misc/ci/sources.list /etc/apt/sources.list
|
||||
sudo apt-get update
|
||||
|
||||
- name: Set up Java 8
|
||||
uses: actions/setup-java@v1
|
||||
- name: Set up Java 11
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: 8
|
||||
distribution: temurin
|
||||
java-version: 11
|
||||
|
||||
# Upload cache on completion and check it out now
|
||||
- name: Load .scons_cache directory
|
||||
id: android-template-cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{github.workspace}}/.scons_cache/
|
||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
@ -43,7 +44,7 @@ jobs:
|
||||
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Semantic version range syntax or exact version of a Python version
|
||||
python-version: '3.x'
|
||||
@ -68,7 +69,7 @@ jobs:
|
||||
cd ../../..
|
||||
ls -l bin/
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: bin/*
|
||||
|
8
.github/workflows/ios_builds.yml
vendored
8
.github/workflows/ios_builds.yml
vendored
@ -13,12 +13,12 @@ jobs:
|
||||
name: Template (target=release, tools=no)
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Upload cache on completion and check it out now
|
||||
- name: Load .scons_cache directory
|
||||
id: ios-template-cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{github.workspace}}/.scons_cache/
|
||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
@ -30,7 +30,7 @@ jobs:
|
||||
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Semantic version range syntax or exact version of a Python version
|
||||
python-version: '3.x'
|
||||
@ -52,7 +52,7 @@ jobs:
|
||||
scons target=release tools=no
|
||||
ls -l bin/
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: bin/*
|
||||
|
12
.github/workflows/javascript_builds.yml
vendored
12
.github/workflows/javascript_builds.yml
vendored
@ -15,7 +15,7 @@ jobs:
|
||||
name: Template (target=release, tools=no)
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
||||
- name: Make apt sources.list use the default Ubuntu repositories
|
||||
@ -27,7 +27,7 @@ jobs:
|
||||
# Upload cache on completion and check it out now
|
||||
- name: Load .scons_cache directory
|
||||
id: javascript-template-cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{github.workspace}}/.scons_cache/
|
||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
@ -40,14 +40,14 @@ jobs:
|
||||
# Additional cache for Emscripten generated system libraries
|
||||
- name: Load Emscripten cache
|
||||
id: javascript-template-emscripten-cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{env.EM_CACHE_FOLDER}}
|
||||
key: ${{env.EM_VERSION}}-${{github.job}}
|
||||
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Semantic version range syntax or exact version of a Python version
|
||||
python-version: '3.x'
|
||||
@ -63,7 +63,7 @@ jobs:
|
||||
scons --version
|
||||
|
||||
- name: Set up Emscripten latest
|
||||
uses: mymindstorm/setup-emsdk@v10
|
||||
uses: mymindstorm/setup-emsdk@v14
|
||||
with:
|
||||
version: ${{env.EM_VERSION}}
|
||||
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
|
||||
@ -79,7 +79,7 @@ jobs:
|
||||
scons target=release tools=no use_closure_compiler=yes
|
||||
ls -l bin/
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: bin/*
|
||||
|
22
.github/workflows/linux_builds.yml
vendored
22
.github/workflows/linux_builds.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
||||
name: Editor w/ Mono (target=release_debug, tools=yes)
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
||||
- name: Make apt sources.list use the default Ubuntu repositories
|
||||
@ -31,7 +31,7 @@ jobs:
|
||||
# Upload cache on completion and check it out now
|
||||
- name: Load .scons_cache directory
|
||||
id: linux-editor-cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{github.workspace}}/.scons_cache/
|
||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
@ -43,7 +43,7 @@ jobs:
|
||||
|
||||
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Semantic version range syntax or exact version of a Python version
|
||||
python-version: '3.x'
|
||||
@ -68,7 +68,7 @@ jobs:
|
||||
scons tools=yes target=release_debug module_mono_enabled=yes mono_glue=yes
|
||||
ls -l bin/
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: bin/*
|
||||
@ -79,7 +79,7 @@ jobs:
|
||||
name: Template w/ Mono (target=release, tools=no)
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
||||
- name: Make apt sources.list use the default Ubuntu repositories
|
||||
@ -97,7 +97,7 @@ jobs:
|
||||
# Upload cache on completion and check it out now
|
||||
- name: Load .scons_cache directory
|
||||
id: linux-template-cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{github.workspace}}/.scons_cache/
|
||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
@ -109,7 +109,7 @@ jobs:
|
||||
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Semantic version range syntax or exact version of a Python version
|
||||
python-version: '3.x'
|
||||
@ -131,7 +131,7 @@ jobs:
|
||||
scons target=release tools=no module_mono_enabled=yes mono_glue=no
|
||||
ls -l bin/
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: bin/*
|
||||
@ -142,7 +142,7 @@ jobs:
|
||||
name: Editor and exported project with sanitizers (target=debug/release, tools=yes/no, use_ubsan=yes, use_asan=yes)
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
||||
- name: Make apt sources.list use the default Ubuntu repositories
|
||||
@ -161,7 +161,7 @@ jobs:
|
||||
# Upload cache on completion and check it out now
|
||||
- name: Load .scons_cache directory
|
||||
id: linux-sanitizer-cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{github.workspace}}/.scons_cache/
|
||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
@ -173,7 +173,7 @@ jobs:
|
||||
|
||||
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Semantic version range syntax or exact version of a Python version
|
||||
python-version: '3.x'
|
||||
|
16
.github/workflows/macos_builds.yml
vendored
16
.github/workflows/macos_builds.yml
vendored
@ -14,12 +14,12 @@ jobs:
|
||||
name: Editor (target=release_debug, tools=yes)
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Upload cache on completion and check it out now
|
||||
- name: Load .scons_cache directory
|
||||
id: macos-editor-cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{github.workspace}}/.scons_cache/
|
||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
@ -31,7 +31,7 @@ jobs:
|
||||
|
||||
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Semantic version range syntax or exact version of a Python version
|
||||
python-version: '3.x'
|
||||
@ -54,7 +54,7 @@ jobs:
|
||||
scons tools=yes target=release_debug
|
||||
ls -l bin/
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: bin/*
|
||||
@ -65,12 +65,12 @@ jobs:
|
||||
name: Template (target=release, tools=no)
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Upload cache on completion and check it out now
|
||||
- name: Load .scons_cache directory
|
||||
id: macos-template-cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{github.workspace}}/.scons_cache/
|
||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
@ -82,7 +82,7 @@ jobs:
|
||||
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Semantic version range syntax or exact version of a Python version
|
||||
python-version: '3.x'
|
||||
@ -104,7 +104,7 @@ jobs:
|
||||
scons target=release tools=no
|
||||
ls -l bin/
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: bin/*
|
||||
|
12
.github/workflows/server_builds.yml
vendored
12
.github/workflows/server_builds.yml
vendored
@ -13,7 +13,7 @@ jobs:
|
||||
name: Linux Headless w/ Mono (target=release_debug, tools=yes)
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
||||
- name: Make apt sources.list use the default Ubuntu repositories
|
||||
@ -30,7 +30,7 @@ jobs:
|
||||
# Upload cache on completion and check it out now
|
||||
- name: Load .scons_cache directory
|
||||
id: linux-headless-cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{github.workspace}}/.scons_cache/
|
||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
@ -42,7 +42,7 @@ jobs:
|
||||
|
||||
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Semantic version range syntax or exact version of a Python version
|
||||
python-version: '3.x'
|
||||
@ -69,7 +69,7 @@ jobs:
|
||||
name: Linux Server w/ Mono (target=release, tools=no)
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Azure repositories are not reliable, we need to prevent azure giving us packages.
|
||||
- name: Make apt sources.list use the default Ubuntu repositories
|
||||
@ -86,7 +86,7 @@ jobs:
|
||||
# Upload cache on completion and check it out now
|
||||
- name: Load .scons_cache directory
|
||||
id: linux-server-cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{github.workspace}}/.scons_cache/
|
||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
@ -98,7 +98,7 @@ jobs:
|
||||
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Semantic version range syntax or exact version of a Python version
|
||||
python-version: '3.x'
|
||||
|
2
.github/workflows/static_checks.yml
vendored
2
.github/workflows/static_checks.yml
vendored
@ -7,7 +7,7 @@ jobs:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v4
|
||||
|
||||
# Azure repositories are not reliable, we need to prevent Azure giving us packages.
|
||||
- name: Make apt sources.list use the default Ubuntu repositories
|
||||
|
20
.github/workflows/windows_builds.yml
vendored
20
.github/workflows/windows_builds.yml
vendored
@ -18,13 +18,17 @@ jobs:
|
||||
name: Editor (target=release_debug, tools=yes)
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
<<<<<<< HEAD
|
||||
- uses: actions/checkout@v4
|
||||
=======
|
||||
- uses: actions/checkout@v4
|
||||
>>>>>>> 6b202812ff (CI: Update all GitHub actions to their latest version)
|
||||
|
||||
# Upload cache on completion and check it out now
|
||||
# Editing this is pretty dangerous for Windows since it can break and needs to be properly tested with a fresh cache.
|
||||
- name: Load .scons_cache directory
|
||||
id: windows-editor-cache
|
||||
uses: actions/cache@v2
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /.scons_cache/
|
||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
@ -36,7 +40,7 @@ jobs:
|
||||
|
||||
# Use python 3.x release (works cross platform; best to keep self contained in it's own step)
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Semantic version range syntax or exact version of a Python version
|
||||
python-version: '3.x'
|
||||
@ -59,7 +63,7 @@ jobs:
|
||||
scons tools=yes target=release_debug
|
||||
ls -l bin/
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: bin/*
|
||||
@ -70,13 +74,13 @@ jobs:
|
||||
name: Template (target=release, tools=no)
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
# Upload cache on completion and check it out now
|
||||
# Editing this is pretty dangerous for Windows since it can break and needs to be properly tested with a fresh cache.
|
||||
- name: Load .scons_cache directory
|
||||
id: windows-template-cache
|
||||
uses: RevoluPowered/cache@v2.1
|
||||
uses: RevoluPowered/cache@v4.1
|
||||
with:
|
||||
path: /.scons_cache/
|
||||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}}
|
||||
@ -88,7 +92,7 @@ jobs:
|
||||
|
||||
# Use python 3.x release (works cross platform)
|
||||
- name: Set up Python 3.x
|
||||
uses: actions/setup-python@v2
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
# Semantic version range syntax or exact version of a Python version
|
||||
python-version: '3.x'
|
||||
@ -110,7 +114,7 @@ jobs:
|
||||
scons target=release tools=no
|
||||
ls -l bin/
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ github.job }}
|
||||
path: bin/*
|
||||
|
@ -1020,7 +1020,9 @@ struct _OSCoreBindImg {
|
||||
};
|
||||
|
||||
void _OS::print_all_textures_by_size() {
|
||||
|
||||
// HACK: This is broken, was fixed in 3.4+, we don't bother here.
|
||||
// Just comment out to silence warnings.
|
||||
/*
|
||||
List<_OSCoreBindImg> imgs;
|
||||
uint64_t total = 0;
|
||||
{
|
||||
@ -1052,6 +1054,7 @@ void _OS::print_all_textures_by_size() {
|
||||
|
||||
total -= E->get().vram;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
void _OS::print_resources_by_type(const Vector<String> &p_types) {
|
||||
|
@ -63,7 +63,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
|
||||
|
||||
int idx = 0;
|
||||
int total_compression_size = 0;
|
||||
int total_string_size = 0;
|
||||
|
||||
for (List<StringName>::Element *E = keys.front(); E; E = E->next()) {
|
||||
|
||||
@ -102,7 +101,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
|
||||
|
||||
compressed.write[idx] = ps;
|
||||
total_compression_size += ps.compressed.size();
|
||||
total_string_size += src_s.size();
|
||||
idx++;
|
||||
}
|
||||
|
||||
@ -149,7 +147,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
|
||||
uint32_t *btw = (uint32_t *)&btwb[0];
|
||||
|
||||
int btindex = 0;
|
||||
int collisions = 0;
|
||||
|
||||
for (int i = 0; i < size; i++) {
|
||||
|
||||
@ -157,8 +154,6 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
|
||||
if (t.size() == 0) {
|
||||
htw[i] = 0xFFFFFFFF; //nothing
|
||||
continue;
|
||||
} else if (t.size() > 1) {
|
||||
collisions += t.size() - 1;
|
||||
}
|
||||
|
||||
htw[i] = btindex;
|
||||
|
@ -32,6 +32,7 @@
|
||||
#define COWDATA_H_
|
||||
|
||||
#include <string.h>
|
||||
#include <type_traits>
|
||||
|
||||
#include "core/error_macros.h"
|
||||
#include "core/os/memory.h"
|
||||
@ -203,7 +204,7 @@ void CowData<T>::_unref(void *p_data) {
|
||||
return; // still in use
|
||||
// clean up
|
||||
|
||||
if (!__has_trivial_destructor(T)) {
|
||||
if (!std::is_trivially_destructible<T>::value) {
|
||||
uint32_t *count = _get_size();
|
||||
T *data = (T *)(count + 1);
|
||||
|
||||
@ -238,7 +239,7 @@ uint32_t CowData<T>::_copy_on_write() {
|
||||
T *_data = (T *)(mem_new);
|
||||
|
||||
// initialize new elements
|
||||
if (__has_trivial_copy(T)) {
|
||||
if (std::is_trivially_copyable<T>::value) {
|
||||
memcpy(mem_new, _ptr, current_size * sizeof(T));
|
||||
|
||||
} else {
|
||||
@ -302,7 +303,7 @@ Error CowData<T>::resize(int p_size) {
|
||||
|
||||
// construct the newly created elements
|
||||
|
||||
if (!__has_trivial_constructor(T)) {
|
||||
if (!std::is_trivially_constructible<T>::value) {
|
||||
T *elems = _get_data();
|
||||
|
||||
for (int i = *_get_size(); i < p_size; i++) {
|
||||
@ -313,8 +314,7 @@ Error CowData<T>::resize(int p_size) {
|
||||
*_get_size() = p_size;
|
||||
|
||||
} else if (p_size < current_size) {
|
||||
|
||||
if (!__has_trivial_destructor(T)) {
|
||||
if (!std::is_trivially_destructible<T>::value) {
|
||||
// deinitialize no longer needed elements
|
||||
for (uint32_t i = p_size; i < *_get_size(); i++) {
|
||||
T *t = &_get_data()[i];
|
||||
|
@ -158,10 +158,11 @@ void RotatedFileLogger::rotate_file() {
|
||||
|
||||
if (FileAccess::exists(base_path)) {
|
||||
if (max_files > 1) {
|
||||
char timestamp[21];
|
||||
const size_t TIMESTAMP_SIZE = 21;
|
||||
char timestamp[TIMESTAMP_SIZE];
|
||||
OS::Date date = OS::get_singleton()->get_date();
|
||||
OS::Time time = OS::get_singleton()->get_time();
|
||||
sprintf(timestamp, "_%04d-%02d-%02d_%02d.%02d.%02d", date.year, date.month, date.day, time.hour, time.min, time.sec);
|
||||
snprintf(timestamp, TIMESTAMP_SIZE, "_%04d-%02d-%02d_%02d.%02d.%02d", date.year, date.month, date.day, time.hour, time.min, time.sec);
|
||||
|
||||
String backup_name = base_path.get_basename() + timestamp;
|
||||
if (base_path.get_extension() != String()) {
|
||||
|
@ -50,7 +50,9 @@ RES TranslationLoaderPO::load_translation(FileAccess *f, Error *r_error) {
|
||||
*r_error = ERR_FILE_CORRUPT;
|
||||
|
||||
Ref<Translation> translation = Ref<Translation>(memnew(Translation));
|
||||
#ifdef DEBUG_ENABLED
|
||||
int line = 1;
|
||||
#endif
|
||||
bool skip_this = false;
|
||||
bool skip_next = false;
|
||||
bool is_eof = false;
|
||||
@ -108,7 +110,9 @@ RES TranslationLoaderPO::load_translation(FileAccess *f, Error *r_error) {
|
||||
if (l.find("fuzzy") != -1) {
|
||||
skip_next = true;
|
||||
}
|
||||
#ifdef DEBUG_ENABLED
|
||||
line++;
|
||||
#endif
|
||||
continue; //nothing to read or comment
|
||||
}
|
||||
|
||||
@ -141,7 +145,9 @@ RES TranslationLoaderPO::load_translation(FileAccess *f, Error *r_error) {
|
||||
else
|
||||
msg_str += l;
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
line++;
|
||||
#endif
|
||||
}
|
||||
|
||||
memdelete(f);
|
||||
|
@ -37,6 +37,8 @@
|
||||
#include "core/sort_array.h"
|
||||
#include "core/vector.h"
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
template <class T, class U = uint32_t, bool force_trivial = false>
|
||||
class LocalVector {
|
||||
private:
|
||||
@ -64,7 +66,7 @@ public:
|
||||
CRASH_COND_MSG(!data, "Out of memory");
|
||||
}
|
||||
|
||||
if (!__has_trivial_constructor(T) && !force_trivial) {
|
||||
if (!std::is_trivially_constructible<T>::value && !force_trivial) {
|
||||
memnew_placement(&data[count++], T(p_elem));
|
||||
} else {
|
||||
data[count++] = p_elem;
|
||||
@ -77,7 +79,7 @@ public:
|
||||
for (U i = p_index; i < count; i++) {
|
||||
data[i] = data[i + 1];
|
||||
}
|
||||
if (!__has_trivial_destructor(T) && !force_trivial) {
|
||||
if (!std::is_trivially_destructible<T>::value && !force_trivial) {
|
||||
data[count].~T();
|
||||
}
|
||||
}
|
||||
@ -90,7 +92,7 @@ public:
|
||||
if (count > p_index) {
|
||||
data[p_index] = data[count];
|
||||
}
|
||||
if (!__has_trivial_destructor(T) && !force_trivial) {
|
||||
if (!std::is_trivially_destructible<T>::value && !force_trivial) {
|
||||
data[count].~T();
|
||||
}
|
||||
}
|
||||
@ -130,7 +132,7 @@ public:
|
||||
_FORCE_INLINE_ U size() const { return count; }
|
||||
void resize(U p_size) {
|
||||
if (p_size < count) {
|
||||
if (!__has_trivial_destructor(T) && !force_trivial) {
|
||||
if (!std::is_trivially_destructible<T>::value && !force_trivial) {
|
||||
for (U i = p_size; i < count; i++) {
|
||||
data[i].~T();
|
||||
}
|
||||
@ -147,7 +149,7 @@ public:
|
||||
data = (T *)memrealloc(data, capacity * sizeof(T));
|
||||
CRASH_COND_MSG(!data, "Out of memory");
|
||||
}
|
||||
if (!__has_trivial_constructor(T) && !force_trivial) {
|
||||
if (!std::is_trivially_constructible<T>::value && !force_trivial) {
|
||||
for (U i = count; i < p_size; i++) {
|
||||
memnew_placement(&data[i], T);
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ static int _bsp_find_best_half_plane(const Face3 *p_faces, const Vector<int> &p_
|
||||
const Face3 &f = p_faces[indices[i]];
|
||||
Plane p = f.get_plane();
|
||||
|
||||
int num_over = 0, num_under = 0, num_spanning = 0;
|
||||
int num_over = 0, num_under = 0; //num_spanning = 0;
|
||||
|
||||
for (int j = 0; j < ic; j++) {
|
||||
|
||||
@ -309,9 +309,9 @@ static int _bsp_find_best_half_plane(const Face3 *p_faces, const Vector<int> &p_
|
||||
}
|
||||
}
|
||||
|
||||
if (over && under)
|
||||
num_spanning++;
|
||||
else if (over)
|
||||
if (over && under) {
|
||||
//num_spanning++;
|
||||
} else if (over)
|
||||
num_over++;
|
||||
else
|
||||
num_under++;
|
||||
|
@ -404,7 +404,6 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me
|
||||
if (O->get().plane.is_equal_approx(f.plane)) {
|
||||
//merge and delete edge and contiguous face, while repointing edges (uuugh!)
|
||||
int ois = O->get().indices.size();
|
||||
int merged = 0;
|
||||
|
||||
for (int j = 0; j < ois; j++) {
|
||||
//search a
|
||||
@ -420,7 +419,6 @@ Error QuickHull::build(const Vector<Vector3> &p_points, Geometry::MeshData &r_me
|
||||
if (idx != a) {
|
||||
f.indices.insert(i + 1, idx);
|
||||
i++;
|
||||
merged++;
|
||||
}
|
||||
Edge e2(idx, idxn);
|
||||
|
||||
|
@ -35,6 +35,7 @@
|
||||
#include "core/safe_refcount.h"
|
||||
|
||||
#include <stddef.h>
|
||||
#include <type_traits>
|
||||
|
||||
#ifndef PAD_ALIGN
|
||||
#define PAD_ALIGN 16 //must always be greater than this at much
|
||||
@ -113,8 +114,9 @@ void memdelete(T *p_class) {
|
||||
|
||||
if (!predelete_handler(p_class))
|
||||
return; // doesn't want to be deleted
|
||||
if (!__has_trivial_destructor(T))
|
||||
if (!std::is_trivially_destructible<T>::value) {
|
||||
p_class->~T();
|
||||
}
|
||||
|
||||
Memory::free_static(p_class, false);
|
||||
}
|
||||
@ -124,8 +126,9 @@ void memdelete_allocator(T *p_class) {
|
||||
|
||||
if (!predelete_handler(p_class))
|
||||
return; // doesn't want to be deleted
|
||||
if (!__has_trivial_destructor(T))
|
||||
if (!std::is_trivially_destructible<T>::value) {
|
||||
p_class->~T();
|
||||
}
|
||||
|
||||
A::free(p_class);
|
||||
}
|
||||
@ -151,7 +154,7 @@ T *memnew_arr_template(size_t p_elements, const char *p_descr = "") {
|
||||
ERR_FAIL_COND_V(!mem, failptr);
|
||||
*(mem - 1) = p_elements;
|
||||
|
||||
if (!__has_trivial_constructor(T)) {
|
||||
if (!std::is_trivially_constructible<T>::value) {
|
||||
T *elems = (T *)mem;
|
||||
|
||||
/* call operator new */
|
||||
@ -180,7 +183,7 @@ void memdelete_arr(T *p_class) {
|
||||
|
||||
uint64_t *ptr = (uint64_t *)p_class;
|
||||
|
||||
if (!__has_trivial_destructor(T)) {
|
||||
if (!std::is_trivially_destructible<T>::value) {
|
||||
uint64_t elem_count = *(ptr - 1);
|
||||
|
||||
for (uint64_t i = 0; i < elem_count; i++) {
|
||||
|
@ -213,12 +213,12 @@ public:
|
||||
size_mask = mask;
|
||||
};
|
||||
|
||||
RingBuffer<T>(int p_power = 0) {
|
||||
RingBuffer(int p_power = 0) {
|
||||
read_pos = 0;
|
||||
write_pos = 0;
|
||||
resize(p_power);
|
||||
};
|
||||
~RingBuffer<T>(){};
|
||||
~RingBuffer() {}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -131,7 +131,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
_ALWAYS_INLINE_ explicit SafeNumeric<T>(T p_value = static_cast<T>(0)) {
|
||||
_ALWAYS_INLINE_ explicit SafeNumeric(T p_value = static_cast<T>(0)) {
|
||||
set(p_value);
|
||||
}
|
||||
};
|
||||
|
@ -2758,21 +2758,19 @@ void RasterizerSceneGLES2::_post_process(Environment *env, const CameraMatrix &p
|
||||
}
|
||||
use_post_process = use_post_process || storage->frame.current_rt->use_fxaa;
|
||||
|
||||
GLuint next_buffer;
|
||||
|
||||
if (use_post_process) {
|
||||
next_buffer = storage->frame.current_rt->mip_maps[0].sizes[0].fbo;
|
||||
} else if (storage->frame.current_rt->external.fbo != 0) {
|
||||
next_buffer = storage->frame.current_rt->external.fbo;
|
||||
} else {
|
||||
// set next_buffer to front buffer so multisample blit can happen if needed
|
||||
next_buffer = storage->frame.current_rt->fbo;
|
||||
}
|
||||
|
||||
// If using multisample buffer, resolve to post_process_effect buffer or to front buffer
|
||||
if (storage->frame.current_rt && storage->frame.current_rt->multisample_active) {
|
||||
#ifdef GLES_OVER_GL
|
||||
GLuint next_buffer;
|
||||
if (use_post_process) {
|
||||
next_buffer = storage->frame.current_rt->mip_maps[0].sizes[0].fbo;
|
||||
} else if (storage->frame.current_rt->external.fbo != 0) {
|
||||
next_buffer = storage->frame.current_rt->external.fbo;
|
||||
} else {
|
||||
// set next_buffer to front buffer so multisample blit can happen if needed
|
||||
next_buffer = storage->frame.current_rt->fbo;
|
||||
}
|
||||
|
||||
#ifdef GLES_OVER_GL
|
||||
glBindFramebuffer(GL_READ_FRAMEBUFFER, storage->frame.current_rt->multisample_fbo);
|
||||
glReadBuffer(GL_COLOR_ATTACHMENT0);
|
||||
glBindFramebuffer(GL_DRAW_FRAMEBUFFER, next_buffer);
|
||||
@ -2794,6 +2792,7 @@ void RasterizerSceneGLES2::_post_process(Environment *env, const CameraMatrix &p
|
||||
_copy_texture_to_buffer(storage->frame.current_rt->multisample_color, next_buffer);
|
||||
#else
|
||||
// TODO: any other platform not supported? this will fail.. maybe we should just call _copy_texture_to_buffer here as well?
|
||||
(void)next_buffer; // Silence warning as it's unused.
|
||||
#endif
|
||||
} else if (use_post_process) {
|
||||
if (storage->frame.current_rt->external.fbo != 0) {
|
||||
|
@ -541,7 +541,6 @@ private:
|
||||
|
||||
Vector<String> failed_files;
|
||||
|
||||
int idx = 0;
|
||||
while (ret == UNZ_OK) {
|
||||
|
||||
//get filename
|
||||
@ -593,7 +592,6 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
idx++;
|
||||
ret = unzGoToNextFile(pkg);
|
||||
}
|
||||
|
||||
|
@ -200,18 +200,14 @@ String ScriptCreateDialog::_validate_path(const String &p_path, bool p_file_must
|
||||
|
||||
bool found = false;
|
||||
bool match = false;
|
||||
int index = 0;
|
||||
for (List<String>::Element *E = extensions.front(); E; E = E->next()) {
|
||||
if (E->get().nocasecmp_to(extension) == 0) {
|
||||
//FIXME (?) - changing language this way doesn't update controls, needs rework
|
||||
//language_menu->select(index); // change Language option by extension
|
||||
found = true;
|
||||
if (E->get() == ScriptServer::get_language(language_menu->get_selected())->get_extension()) {
|
||||
match = true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
index++;
|
||||
}
|
||||
|
||||
if (!found) return TTR("Invalid extension.");
|
||||
|
@ -1037,7 +1037,7 @@ InputDefault::JoyEvent InputDefault::_get_mapped_axis_event(const JoyDeviceMappi
|
||||
return event;
|
||||
}
|
||||
|
||||
void InputDefault::_get_mapped_hat_events(const JoyDeviceMapping &mapping, int p_hat, JoyEvent r_events[]) {
|
||||
void InputDefault::_get_mapped_hat_events(const JoyDeviceMapping &mapping, int p_hat, JoyEvent r_events[(size_t)HAT_MAX]) {
|
||||
|
||||
for (int i = 0; i < mapping.bindings.size(); i++) {
|
||||
const JoyBinding binding = mapping.bindings[i];
|
||||
|
@ -827,7 +827,7 @@ def get_compiler_version(env):
|
||||
return None
|
||||
else: # TODO: Implement for MSVC
|
||||
return None
|
||||
match = re.search("[0-9]+\.[0-9.]+", version)
|
||||
match = re.search(r"[0-9]+\.[0-9.]+", version)
|
||||
if match is not None:
|
||||
return list(map(int, match.group().split(".")))
|
||||
else:
|
||||
|
@ -734,7 +734,7 @@ void CSGBrushOperation::MeshMerge::mark_inside_faces() {
|
||||
}
|
||||
}
|
||||
|
||||
void CSGBrushOperation::MeshMerge::add_face(const Vector3 p_points[], const Vector2 p_uvs[], bool p_smooth, bool p_invert, const Ref<Material> &p_material, bool p_from_b) {
|
||||
void CSGBrushOperation::MeshMerge::add_face(const Vector3 p_points[3], const Vector2 p_uvs[3], bool p_smooth, bool p_invert, const Ref<Material> &p_material, bool p_from_b) {
|
||||
|
||||
int indices[3];
|
||||
for (int i = 0; i < 3; i++) {
|
||||
@ -1390,14 +1390,14 @@ void CSGBrushOperation::update_faces(const CSGBrush &p_brush_a, const int p_face
|
||||
if (has_degenerate) return;
|
||||
|
||||
// Ensure B has points either side of or in the plane of A.
|
||||
int in_plane_count = 0, over_count = 0, under_count = 0;
|
||||
int over_count = 0, under_count = 0;
|
||||
Plane plane_a(vertices_a[0], vertices_a[1], vertices_a[2]);
|
||||
ERR_FAIL_COND_MSG(plane_a.normal == Vector3(), "Couldn't form plane from Brush A face.");
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (plane_a.has_point(vertices_b[i]))
|
||||
in_plane_count++;
|
||||
else if (plane_a.is_point_over(vertices_b[i]))
|
||||
if (plane_a.has_point(vertices_b[i])) {
|
||||
// In plane.
|
||||
} else if (plane_a.is_point_over(vertices_b[i]))
|
||||
over_count++;
|
||||
else
|
||||
under_count++;
|
||||
@ -1406,16 +1406,15 @@ void CSGBrushOperation::update_faces(const CSGBrush &p_brush_a, const int p_face
|
||||
if (over_count == 3 || under_count == 3) return;
|
||||
|
||||
// Ensure A has points either side of or in the plane of B.
|
||||
in_plane_count = 0;
|
||||
over_count = 0;
|
||||
under_count = 0;
|
||||
Plane plane_b(vertices_b[0], vertices_b[1], vertices_b[2]);
|
||||
ERR_FAIL_COND_MSG(plane_b.normal == Vector3(), "Couldn't form plane from Brush B face.");
|
||||
|
||||
for (int i = 0; i < 3; i++) {
|
||||
if (plane_b.has_point(vertices_a[i]))
|
||||
in_plane_count++;
|
||||
else if (plane_b.is_point_over(vertices_a[i]))
|
||||
if (plane_b.has_point(vertices_a[i])) {
|
||||
// In plane.
|
||||
} else if (plane_b.is_point_over(vertices_a[i]))
|
||||
over_count++;
|
||||
else
|
||||
under_count++;
|
||||
|
@ -1273,7 +1273,6 @@ int GDScriptCompiler::_parse_expression(CodeGen &codegen, const GDScriptParser::
|
||||
Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::BlockNode *p_block, int p_stack_level, int p_break_addr, int p_continue_addr) {
|
||||
|
||||
codegen.push_stack_identifiers();
|
||||
int new_identifiers = 0;
|
||||
codegen.current_line = p_block->line;
|
||||
|
||||
for (int i = 0; i < p_block->statements.size(); i++) {
|
||||
@ -1306,7 +1305,6 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Blo
|
||||
// copied because there is no _parse_statement :(
|
||||
codegen.add_stack_identifier(id->name, p_stack_level++);
|
||||
codegen.alloc_stack(p_stack_level);
|
||||
new_identifiers++;
|
||||
|
||||
GDScriptParser::OperatorNode *op = memnew(GDScriptParser::OperatorNode);
|
||||
op->op = GDScriptParser::OperatorNode::OP_ASSIGN;
|
||||
@ -1566,8 +1564,6 @@ Error GDScriptCompiler::_parse_block(CodeGen &codegen, const GDScriptParser::Blo
|
||||
|
||||
codegen.add_stack_identifier(lv->name, p_stack_level++);
|
||||
codegen.alloc_stack(p_stack_level);
|
||||
new_identifiers++;
|
||||
|
||||
} break;
|
||||
default: {
|
||||
//expression
|
||||
|
@ -7111,9 +7111,11 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat
|
||||
DataType return_type;
|
||||
List<DataType> arg_types;
|
||||
int default_args_count = 0;
|
||||
int arg_count = p_call->arguments.size();
|
||||
String callee_name;
|
||||
bool is_vararg = false;
|
||||
#ifdef DEBUG_ENABLED
|
||||
int arg_count = p_call->arguments.size();
|
||||
#endif
|
||||
|
||||
switch (p_call->arguments[0]->type) {
|
||||
case GDScriptParser::Node::TYPE_TYPE: {
|
||||
@ -7220,7 +7222,9 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat
|
||||
|
||||
default_args_count = mi.default_arguments.size();
|
||||
callee_name = mi.name;
|
||||
#ifdef DEBUG_ENABLED
|
||||
arg_count -= 1;
|
||||
#endif
|
||||
|
||||
// Check each argument type
|
||||
for (List<PropertyInfo>::Element *E = mi.arguments.front(); E; E = E->next()) {
|
||||
@ -7247,7 +7251,9 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat
|
||||
|
||||
IdentifierNode *func_id = static_cast<IdentifierNode *>(p_call->arguments[arg_id]);
|
||||
callee_name = func_id->name;
|
||||
#ifdef DEBUG_ENABLED
|
||||
arg_count -= 1 + arg_id;
|
||||
#endif
|
||||
|
||||
DataType base_type;
|
||||
if (p_call->op == OperatorNode::OP_PARENT_CALL) {
|
||||
@ -7426,7 +7432,6 @@ GDScriptParser::DataType GDScriptParser::_reduce_function_call_type(const Operat
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // DEBUG_ENABLED
|
||||
|
||||
return return_type;
|
||||
|
@ -471,9 +471,8 @@ def copy_mono_root_files(env, mono_root, mono_bcl):
|
||||
|
||||
|
||||
def copy_mono_etc_dir(mono_root, target_mono_config_dir, platform):
|
||||
from distutils.dir_util import copy_tree
|
||||
from glob import glob
|
||||
from shutil import copy
|
||||
from shutil import copy, copytree
|
||||
|
||||
if not os.path.isdir(target_mono_config_dir):
|
||||
os.makedirs(target_mono_config_dir)
|
||||
@ -493,11 +492,11 @@ def copy_mono_etc_dir(mono_root, target_mono_config_dir, platform):
|
||||
if not mono_etc_dir:
|
||||
raise RuntimeError("Mono installation etc directory not found")
|
||||
|
||||
copy_tree(os.path.join(mono_etc_dir, "2.0"), os.path.join(target_mono_config_dir, "2.0"))
|
||||
copy_tree(os.path.join(mono_etc_dir, "4.0"), os.path.join(target_mono_config_dir, "4.0"))
|
||||
copy_tree(os.path.join(mono_etc_dir, "4.5"), os.path.join(target_mono_config_dir, "4.5"))
|
||||
copytree(os.path.join(mono_etc_dir, "2.0"), os.path.join(target_mono_config_dir, "2.0"))
|
||||
copytree(os.path.join(mono_etc_dir, "4.0"), os.path.join(target_mono_config_dir, "4.0"))
|
||||
copytree(os.path.join(mono_etc_dir, "4.5"), os.path.join(target_mono_config_dir, "4.5"))
|
||||
if os.path.isdir(os.path.join(mono_etc_dir, "mconfig")):
|
||||
copy_tree(os.path.join(mono_etc_dir, "mconfig"), os.path.join(target_mono_config_dir, "mconfig"))
|
||||
copytree(os.path.join(mono_etc_dir, "mconfig"), os.path.join(target_mono_config_dir, "mconfig"))
|
||||
|
||||
for file in glob(os.path.join(mono_etc_dir, "*")):
|
||||
if os.path.isfile(file):
|
||||
|
@ -1,7 +1,6 @@
|
||||
import os
|
||||
import sys
|
||||
import platform
|
||||
from distutils.version import LooseVersion
|
||||
|
||||
|
||||
def is_active():
|
||||
@ -308,8 +307,14 @@ def configure(env):
|
||||
|
||||
# Link flags
|
||||
|
||||
# HACK: Replaced use of now obsoleted distutils.version.LooseVersion with this simple method,
|
||||
# which isn't bullet proof but should be sufficient here with "x.y.z" parameters.
|
||||
# Alternatives imply adding more dependencies.
|
||||
def version_tuple(v):
|
||||
return tuple(map(int, (v.split("."))))
|
||||
|
||||
ndk_version = get_env_ndk_version(env["ANDROID_NDK_ROOT"])
|
||||
if ndk_version != None and LooseVersion(ndk_version) >= LooseVersion("17.1.4828580"):
|
||||
if ndk_version != None and version_tuple(ndk_version) >= version_tuple("17.1.4828580"):
|
||||
env.Append(LINKFLAGS=["-Wl,--exclude-libs,libgcc.a", "-Wl,--exclude-libs,libatomic.a", "-nostdlib++"])
|
||||
else:
|
||||
env.Append(
|
||||
|
@ -1500,7 +1500,6 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
|
||||
pkg_name = "Unnamed";
|
||||
|
||||
bool found_library = false;
|
||||
int total_size = 0;
|
||||
|
||||
const String project_file = "godot_ios.xcodeproj/project.pbxproj";
|
||||
Set<String> files_to_parse;
|
||||
@ -1596,7 +1595,6 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p
|
||||
file = file.replace("godot_ios", binary_name);
|
||||
|
||||
print_line("ADDING: " + file + " size: " + itos(data.size()));
|
||||
total_size += data.size();
|
||||
|
||||
/* write it into our folder structure */
|
||||
file = dest_dir + file;
|
||||
|
@ -574,7 +574,6 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
|
||||
|
||||
// Now process our template.
|
||||
bool found_binary = false;
|
||||
int total_size = 0;
|
||||
Vector<String> dylibs_found;
|
||||
|
||||
while (ret == UNZ_OK && err == OK) {
|
||||
@ -662,7 +661,6 @@ Error EditorExportPlatformOSX::export_project(const Ref<EditorExportPreset> &p_p
|
||||
}
|
||||
|
||||
print_line("ADDING: " + file + " size: " + itos(data.size()));
|
||||
total_size += data.size();
|
||||
|
||||
// Write it into our application bundle.
|
||||
file = tmp_app_path_name.plus_file(file);
|
||||
|
@ -326,7 +326,7 @@ bool JoypadOSX::configure_joypad(IOHIDDeviceRef p_device_ref, joypad *p_joy) {
|
||||
|
||||
if (vendor && product_id) {
|
||||
char uid[128];
|
||||
sprintf(uid, "%08x%08x%08x%08x", OSSwapHostToBigInt32(3), OSSwapHostToBigInt32(vendor), OSSwapHostToBigInt32(product_id), OSSwapHostToBigInt32(version));
|
||||
snprintf(uid, 128, "%08x%08x%08x%08x", OSSwapHostToBigInt32(3), OSSwapHostToBigInt32(vendor), OSSwapHostToBigInt32(product_id), OSSwapHostToBigInt32(version));
|
||||
input->joy_connection_changed(id, true, name, uid);
|
||||
} else {
|
||||
//bluetooth device
|
||||
|
@ -365,7 +365,7 @@ def configure(env):
|
||||
import re
|
||||
|
||||
linker_version_str = subprocess.check_output([env.subst(env["LINK"]), "-Wl,--version"]).decode("utf-8")
|
||||
gnu_ld_version = re.search("^GNU ld [^$]*(\d+\.\d+)$", linker_version_str, re.MULTILINE)
|
||||
gnu_ld_version = re.search(r"^GNU ld [^$]*(\d+\.\d+)$", linker_version_str, re.MULTILINE)
|
||||
if not gnu_ld_version:
|
||||
print(
|
||||
"Warning: Creating template binaries enabled for PCK embedding is currently only supported with GNU ld"
|
||||
|
@ -850,8 +850,6 @@ void VoxelLightBaker::plot_light_directional(const Vector3 &p_direction, const C
|
||||
|
||||
float distance_adv = _get_normal_advance(light_axis);
|
||||
|
||||
int success_count = 0;
|
||||
|
||||
Vector3 light_energy = Vector3(p_color.r, p_color.g, p_color.b) * p_energy * p_indirect_energy;
|
||||
|
||||
int idx = first_leaf;
|
||||
@ -915,7 +913,6 @@ void VoxelLightBaker::plot_light_directional(const Vector3 &p_direction, const C
|
||||
light->direct_accum[i][2] += light_energy.z * s;
|
||||
}
|
||||
}
|
||||
success_count++;
|
||||
}
|
||||
|
||||
idx = light_data[idx].next_leaf;
|
||||
|
@ -182,7 +182,6 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
|
||||
}
|
||||
|
||||
int wofs = margin;
|
||||
int spaces_size = 0;
|
||||
int align_ofs = 0;
|
||||
|
||||
if (p_mode != PROCESS_CACHE && align != ALIGN_FILL)
|
||||
@ -240,7 +239,6 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
|
||||
line_ascent = 0; \
|
||||
line_descent = 0; \
|
||||
spaces = 0; \
|
||||
spaces_size = 0; \
|
||||
wofs = begin; \
|
||||
align_ofs = 0; \
|
||||
if (p_mode != PROCESS_CACHE) { \
|
||||
@ -444,9 +442,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
|
||||
fh = line_ascent + line_descent;
|
||||
|
||||
if (end && c[end - 1] == ' ') {
|
||||
if (p_mode == PROCESS_CACHE) {
|
||||
spaces_size += font->get_char_size(' ').width;
|
||||
} else if (align == ALIGN_FILL) {
|
||||
if (align == ALIGN_FILL) {
|
||||
int ln = MIN(l.offset_caches.size() - 1, line);
|
||||
if (l.space_caches[ln]) {
|
||||
align_ofs = spaces * l.offset_caches[ln] / l.space_caches[ln];
|
||||
|
@ -144,7 +144,7 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector
|
||||
|
||||
if (!_is_point_inside(from)) {
|
||||
|
||||
float closest_dist = 1e20;
|
||||
float closest_dist = 1e20f;
|
||||
Vector2 closest_point;
|
||||
|
||||
for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) {
|
||||
@ -169,7 +169,7 @@ Vector<Vector2> PolygonPathFinder::find_path(const Vector2 &p_from, const Vector
|
||||
};
|
||||
|
||||
if (!_is_point_inside(to)) {
|
||||
float closest_dist = 1e20;
|
||||
float closest_dist = 1e20f;
|
||||
Vector2 closest_point;
|
||||
|
||||
for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) {
|
||||
@ -516,7 +516,7 @@ bool PolygonPathFinder::is_point_inside(const Vector2 &p_point) const {
|
||||
|
||||
Vector2 PolygonPathFinder::get_closest_point(const Vector2 &p_point) const {
|
||||
|
||||
float closest_dist = 1e20;
|
||||
float closest_dist = 1e20f;
|
||||
Vector2 closest_point;
|
||||
|
||||
for (Set<Edge>::Element *E = edges.front(); E; E = E->next()) {
|
||||
@ -536,7 +536,7 @@ Vector2 PolygonPathFinder::get_closest_point(const Vector2 &p_point) const {
|
||||
}
|
||||
}
|
||||
|
||||
ERR_FAIL_COND_V(closest_dist == 1e20, Vector2());
|
||||
ERR_FAIL_COND_V(Math::is_equal_approx(closest_dist, 1e20f), Vector2());
|
||||
|
||||
return closest_point;
|
||||
}
|
||||
|
@ -2858,10 +2858,6 @@ void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, co
|
||||
|
||||
float distance_adv = _get_normal_advance(light_axis);
|
||||
|
||||
int success_count = 0;
|
||||
|
||||
// uint64_t us = OS::get_singleton()->get_ticks_usec();
|
||||
|
||||
for (int i = 0; i < p_leaf_count; i++) {
|
||||
|
||||
uint32_t idx = leaves[i];
|
||||
@ -2912,19 +2908,11 @@ void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, co
|
||||
light->energy[0] += int32_t(light_r * att * ((cell->albedo >> 16) & 0xFF) / 255.0);
|
||||
light->energy[1] += int32_t(light_g * att * ((cell->albedo >> 8) & 0xFF) / 255.0);
|
||||
light->energy[2] += int32_t(light_b * att * ((cell->albedo) & 0xFF) / 255.0);
|
||||
success_count++;
|
||||
}
|
||||
}
|
||||
|
||||
// print_line("BAKE TIME: " + rtos((OS::get_singleton()->get_ticks_usec() - us) / 1000000.0));
|
||||
// print_line("valid cells: " + itos(success_count));
|
||||
|
||||
} break;
|
||||
case VS::LIGHT_OMNI:
|
||||
case VS::LIGHT_SPOT: {
|
||||
|
||||
// uint64_t us = OS::get_singleton()->get_ticks_usec();
|
||||
|
||||
Vector3 light_pos = light_cache.transform.origin;
|
||||
Vector3 spot_axis = -light_cache.transform.basis.get_axis(2).normalized();
|
||||
|
||||
@ -3024,7 +3012,6 @@ void VisualServerScene::_bake_gi_probe_light(const GIProbeDataHeader *header, co
|
||||
light->energy[2] += int32_t(light_b * att * ((cell->albedo) & 0xFF) / 255.0);
|
||||
}
|
||||
}
|
||||
//print_line("BAKE TIME: " + rtos((OS::get_singleton()->get_ticks_usec() - us) / 1000000.0));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
@ -111,8 +111,6 @@ void VisualServerViewport::_draw_viewport(Viewport *p_viewport, ARVRInterface::E
|
||||
}
|
||||
|
||||
if (!p_viewport->hide_canvas) {
|
||||
int i = 0;
|
||||
|
||||
Map<Viewport::CanvasKey, Viewport::CanvasData *> canvas_map;
|
||||
|
||||
Rect2 clip_rect(0, 0, p_viewport->size.x, p_viewport->size.y);
|
||||
@ -121,8 +119,6 @@ void VisualServerViewport::_draw_viewport(Viewport *p_viewport, ARVRInterface::E
|
||||
RasterizerCanvas::Light *lights_with_mask = NULL;
|
||||
Rect2 shadow_rect;
|
||||
|
||||
int light_count = 0;
|
||||
|
||||
for (Map<RID, Viewport::CanvasData>::Element *E = p_viewport->canvas_map.front(); E; E = E->next()) {
|
||||
|
||||
VisualServerCanvas::Canvas *canvas = static_cast<VisualServerCanvas::Canvas *>(E->get().canvas);
|
||||
@ -168,8 +164,6 @@ void VisualServerViewport::_draw_viewport(Viewport *p_viewport, ARVRInterface::E
|
||||
cl->mask_next_ptr = lights_with_mask;
|
||||
lights_with_mask = cl;
|
||||
}
|
||||
|
||||
light_count++;
|
||||
}
|
||||
|
||||
VSG::canvas_render->light_internal_update(cl->light_internal, cl);
|
||||
@ -243,7 +237,6 @@ void VisualServerViewport::_draw_viewport(Viewport *p_viewport, ARVRInterface::E
|
||||
}
|
||||
|
||||
VSG::canvas->render_canvas(canvas, xform, canvas_lights, lights_with_mask, clip_rect, canvas_layer_id);
|
||||
i++;
|
||||
|
||||
if (scenario_draw_canvas_bg && E->key().get_layer() >= scenario_canvas_max_layer) {
|
||||
if (!can_draw_3d) {
|
||||
|
7
thirdparty/README.md
vendored
7
thirdparty/README.md
vendored
@ -20,9 +20,14 @@ Files extracted from upstream source:
|
||||
## certs
|
||||
|
||||
- Upstream: Mozilla, via https://github.com/bagder/ca-bundle
|
||||
- Version: git (8b263a18fca98ea371e54227837321c5cdaa1ba7, 2021)
|
||||
- Version: git (4d3fe6683f651d96be1bbef316b201e9b33b274d, 2024),
|
||||
generated from mozilla-release changeset b8ea2342548b8571e58f9176d9555ccdb5ec199f
|
||||
- License: MPL 2.0
|
||||
|
||||
Files extracted from upstream source:
|
||||
|
||||
- `ca-bundle.crt` renamed to `ca-certificates.crt`
|
||||
|
||||
|
||||
## cvtt
|
||||
|
||||
|
@ -233,9 +233,9 @@ struct btSparseSdf
|
||||
//int sz = sizeof(Cell);
|
||||
if (ncells > m_clampCells)
|
||||
{
|
||||
static int numResets = 0;
|
||||
numResets++;
|
||||
// printf("numResets=%d\n",numResets);
|
||||
//static int numResets = 0;
|
||||
//numResets++;
|
||||
//printf("numResets=%d\n",numResets);
|
||||
Reset();
|
||||
}
|
||||
|
||||
|
17
thirdparty/bullet/patches/fix-unused-but-set-warning.patch
vendored
Normal file
17
thirdparty/bullet/patches/fix-unused-but-set-warning.patch
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
diff --git a/thirdparty/bullet/BulletSoftBody/btSparseSDF.h b/thirdparty/bullet/BulletSoftBody/btSparseSDF.h
|
||||
index ae1288d9e6..243b80f8ae 100644
|
||||
--- a/thirdparty/bullet/BulletSoftBody/btSparseSDF.h
|
||||
+++ b/thirdparty/bullet/BulletSoftBody/btSparseSDF.h
|
||||
@@ -233,9 +233,9 @@ struct btSparseSdf
|
||||
//int sz = sizeof(Cell);
|
||||
if (ncells > m_clampCells)
|
||||
{
|
||||
- static int numResets = 0;
|
||||
- numResets++;
|
||||
- // printf("numResets=%d\n",numResets);
|
||||
+ //static int numResets = 0;
|
||||
+ //numResets++;
|
||||
+ //printf("numResets=%d\n",numResets);
|
||||
Reset();
|
||||
}
|
||||
|
1539
thirdparty/certs/ca-certificates.crt
vendored
1539
thirdparty/certs/ca-certificates.crt
vendored
File diff suppressed because it is too large
Load Diff
38
thirdparty/vhacd/0006-fix-gcc13.patch
vendored
Normal file
38
thirdparty/vhacd/0006-fix-gcc13.patch
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
diff --git a/thirdparty/vhacd/inc/vhacdICHull.h b/thirdparty/vhacd/inc/vhacdICHull.h
|
||||
index 132bdcfb3e..925584cf52 100644
|
||||
--- a/thirdparty/vhacd/inc/vhacdICHull.h
|
||||
+++ b/thirdparty/vhacd/inc/vhacdICHull.h
|
||||
@@ -18,6 +18,10 @@
|
||||
#include "vhacdManifoldMesh.h"
|
||||
#include "vhacdVector.h"
|
||||
|
||||
+// -- GODOT start --
|
||||
+#include <cstdint>
|
||||
+// -- GODOT end --
|
||||
+
|
||||
namespace VHACD {
|
||||
//! Incremental Convex Hull algorithm (cf. http://cs.smith.edu/~orourke/books/ftp.html ).
|
||||
enum ICHullError {
|
||||
diff --git a/thirdparty/vhacd/inc/vhacdManifoldMesh.h b/thirdparty/vhacd/inc/vhacdManifoldMesh.h
|
||||
index a48f53c5c5..5eed4e13aa 100644
|
||||
--- a/thirdparty/vhacd/inc/vhacdManifoldMesh.h
|
||||
+++ b/thirdparty/vhacd/inc/vhacdManifoldMesh.h
|
||||
@@ -18,6 +18,11 @@ All rights reserved.
|
||||
#include "vhacdCircularList.h"
|
||||
#include "vhacdSArray.h"
|
||||
#include "vhacdVector.h"
|
||||
+
|
||||
+// -- GODOT start --
|
||||
+#include <cstdint>
|
||||
+// -- GODOT end --
|
||||
+
|
||||
namespace VHACD {
|
||||
class TMMTriangle;
|
||||
class TMMEdge;
|
||||
@@ -139,4 +144,4 @@ private:
|
||||
friend class ICHull;
|
||||
};
|
||||
}
|
||||
-#endif // VHACD_MANIFOLD_MESH_H
|
||||
\ No newline at end of file
|
||||
+#endif // VHACD_MANIFOLD_MESH_H
|
4
thirdparty/vhacd/inc/vhacdICHull.h
vendored
4
thirdparty/vhacd/inc/vhacdICHull.h
vendored
@ -18,6 +18,10 @@
|
||||
#include "vhacdManifoldMesh.h"
|
||||
#include "vhacdVector.h"
|
||||
|
||||
// -- GODOT start --
|
||||
#include <cstdint>
|
||||
// -- GODOT end --
|
||||
|
||||
namespace VHACD {
|
||||
//! Incremental Convex Hull algorithm (cf. http://cs.smith.edu/~orourke/books/ftp.html ).
|
||||
enum ICHullError {
|
||||
|
7
thirdparty/vhacd/inc/vhacdManifoldMesh.h
vendored
7
thirdparty/vhacd/inc/vhacdManifoldMesh.h
vendored
@ -18,6 +18,11 @@ All rights reserved.
|
||||
#include "vhacdCircularList.h"
|
||||
#include "vhacdSArray.h"
|
||||
#include "vhacdVector.h"
|
||||
|
||||
// -- GODOT start --
|
||||
#include <cstdint>
|
||||
// -- GODOT end --
|
||||
|
||||
namespace VHACD {
|
||||
class TMMTriangle;
|
||||
class TMMEdge;
|
||||
@ -139,4 +144,4 @@ private:
|
||||
friend class ICHull;
|
||||
};
|
||||
}
|
||||
#endif // VHACD_MANIFOLD_MESH_H
|
||||
#endif // VHACD_MANIFOLD_MESH_H
|
||||
|
Loading…
Reference in New Issue
Block a user