mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Compile issues for 64bits int under i386
This commit is contained in:
@@ -8,10 +8,13 @@
|
||||
|
||||
#include <chrono>
|
||||
#include <ctime>
|
||||
|
||||
|
||||
uint64_t GlmToolkit::uniqueId()
|
||||
{
|
||||
auto duration = std::chrono::high_resolution_clock::now().time_since_epoch(); // 18446744073709551615
|
||||
return std::chrono::duration_cast<std::chrono::nanoseconds>(duration).count() % 1000000000000000000LL;
|
||||
auto duration = std::chrono::high_resolution_clock::now().time_since_epoch();
|
||||
// 64-bit int 18446744073709551615UL
|
||||
return std::chrono::duration_cast<std::chrono::nanoseconds>(duration).count() % 1000000000000000000UL;
|
||||
}
|
||||
|
||||
glm::mat4 GlmToolkit::transform(glm::vec3 translation, glm::vec3 rotation, glm::vec3 scale)
|
||||
|
||||
@@ -13,9 +13,9 @@
|
||||
#endif
|
||||
#include "imgui_internal.h"
|
||||
|
||||
#define MILISECOND 1000000L
|
||||
#define SECOND 1000000000L
|
||||
#define MINUTE 60000000000L
|
||||
#define MILISECOND 1000000UL
|
||||
#define SECOND 1000000000UL
|
||||
#define MINUTE 60000000000UL
|
||||
|
||||
#include "Resource.h"
|
||||
#include "FileDialog.h"
|
||||
|
||||
@@ -123,12 +123,12 @@ XMLElement *tinyxml2::XMLElementEncodeArray(XMLDocument *doc, void *array, unsig
|
||||
newelement->SetAttribute("zbytes", (uint) compressed_size);
|
||||
|
||||
// encode the compressed array
|
||||
encoded_array = g_base64_encode( (guchar *) compressed_array, compressed_size);
|
||||
encoded_array = g_base64_encode( (guchar *) compressed_array, (gsize) compressed_size);
|
||||
}
|
||||
// failed compression
|
||||
else {
|
||||
// encode the raw array
|
||||
encoded_array = g_base64_encode( (guchar *) array, (uLong) arraysize);
|
||||
encoded_array = g_base64_encode( (guchar *) array, (gsize) arraysize);
|
||||
}
|
||||
|
||||
// save the encoded string as text
|
||||
@@ -156,7 +156,7 @@ bool tinyxml2::XMLElementDecodeArray(XMLElement *elem, void *array, unsigned int
|
||||
return ret;
|
||||
|
||||
// read and decode the text field in <array>
|
||||
uLong decoded_size = 0;
|
||||
gsize decoded_size = 0;
|
||||
guchar *decoded_array = g_base64_decode(elem->GetText(), &decoded_size);
|
||||
|
||||
// if data is z-compressed (zbytes size is indicated)
|
||||
@@ -164,7 +164,7 @@ bool tinyxml2::XMLElementDecodeArray(XMLElement *elem, void *array, unsigned int
|
||||
elem->QueryUnsignedAttribute("zbytes", &zbytes);
|
||||
if ( zbytes > 0) {
|
||||
// sanity check 1: decoded data size must match the buffer size
|
||||
if ( decoded_array && zbytes == decoded_size ) {
|
||||
if ( decoded_array && zbytes == (uint) decoded_size ) {
|
||||
|
||||
// allocate a temporary array for decompressing data
|
||||
uLong uncompressed_size = arraysize;
|
||||
|
||||
Reference in New Issue
Block a user