mirror of
https://github.com/Redot-Engine/redot-engine.git
synced 2025-12-06 07:17:42 -05:00
Merge branch 'master' of https://github.com/okamstudio/godot
Conflicts: modules/multiscript/register_types.cpp platform/android/java/src/com/android/godot/GodotLib.java
This commit is contained in:
@@ -55,7 +55,7 @@ int Compression::compress(uint8_t *p_dst, const uint8_t *p_src, int p_src_size,M
|
||||
strm.zfree = zipio_free;
|
||||
strm.opaque = Z_NULL;
|
||||
int err = deflateInit(&strm,Z_DEFAULT_COMPRESSION);
|
||||
if (err==Z_OK)
|
||||
if (err!=Z_OK)
|
||||
return -1;
|
||||
|
||||
strm.avail_in=p_src_size;
|
||||
@@ -93,7 +93,7 @@ int Compression::get_max_compressed_buffer_size(int p_src_size,Mode p_mode){
|
||||
strm.zfree = zipio_free;
|
||||
strm.opaque = Z_NULL;
|
||||
int err = deflateInit(&strm,Z_DEFAULT_COMPRESSION);
|
||||
if (err==Z_OK)
|
||||
if (err!=Z_OK)
|
||||
return -1;
|
||||
int aout = deflateBound(&strm,p_src_size);
|
||||
deflateEnd(&strm);
|
||||
|
||||
@@ -38,7 +38,7 @@ class MemoryPoolDynamicStatic : public MemoryPoolDynamic {
|
||||
_THREAD_SAFE_CLASS_
|
||||
|
||||
enum {
|
||||
MAX_CHUNKS=16384
|
||||
MAX_CHUNKS=65536
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -2501,19 +2501,21 @@ bool String::begins_with(const String& p_string) const {
|
||||
const CharType *src=&p_string[0];
|
||||
const CharType *str=&operator[](0);
|
||||
|
||||
for (int i=0;i<l;i++) {
|
||||
int i = 0;
|
||||
for (;i<l;i++) {
|
||||
|
||||
if (src[i]!=str[i])
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
// only if i == l the p_string matches the beginning
|
||||
return i == l;
|
||||
|
||||
}
|
||||
bool String::begins_with(const char* p_string) const {
|
||||
|
||||
int l=length();
|
||||
if (l==0)
|
||||
if (l==0||!p_string)
|
||||
return false;
|
||||
|
||||
const CharType *str=&operator[](0);
|
||||
|
||||
Reference in New Issue
Block a user