mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Fix false positive warning with FixedVector array bounds in gcc.
This commit is contained in:
committed by
Arctis-Fireblight
parent
4d26476d01
commit
71fb8d8368
@@ -34,6 +34,8 @@
|
|||||||
|
|
||||||
#include "core/templates/span.h"
|
#include "core/templates/span.h"
|
||||||
|
|
||||||
|
GODOT_GCC_WARNING_PUSH_AND_IGNORE("-Warray-bounds")
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A high performance Vector of fixed capacity.
|
* A high performance Vector of fixed capacity.
|
||||||
* Especially useful if you need to create an array on the stack, to
|
* Especially useful if you need to create an array on the stack, to
|
||||||
@@ -165,3 +167,5 @@ public:
|
|||||||
_FORCE_INLINE_ constexpr const T *begin() const { return ptr(); }
|
_FORCE_INLINE_ constexpr const T *begin() const { return ptr(); }
|
||||||
_FORCE_INLINE_ constexpr const T *end() const { return ptr() + _size; }
|
_FORCE_INLINE_ constexpr const T *end() const { return ptr() + _size; }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
GODOT_GCC_WARNING_POP
|
||||||
|
|||||||
@@ -153,6 +153,7 @@ Error MultiplayerPeerExtension::get_packet(const uint8_t **r_buffer, int &r_buff
|
|||||||
}
|
}
|
||||||
|
|
||||||
Error MultiplayerPeerExtension::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
|
Error MultiplayerPeerExtension::put_packet(const uint8_t *p_buffer, int p_buffer_size) {
|
||||||
|
ERR_FAIL_COND_V(p_buffer_size < 0, ERR_INVALID_PARAMETER);
|
||||||
Error err;
|
Error err;
|
||||||
if (GDVIRTUAL_CALL(_put_packet, p_buffer, p_buffer_size, err)) {
|
if (GDVIRTUAL_CALL(_put_packet, p_buffer, p_buffer_size, err)) {
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
Reference in New Issue
Block a user