mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-07-23 03:02:50 +03:00
Fix emscripten build.
This commit is contained in:
@@ -33,8 +33,15 @@ class EE_API PropertySpecification {
|
||||
|
||||
protected:
|
||||
friend class PropertyDefinition;
|
||||
|
||||
// Investigate why robin_hood::unordered_flat_map fails with wasm build!
|
||||
#if EE_PLATFORM == EE_PLATFORM_EMSCRIPTEN
|
||||
std::unordered_map<Uint32, std::shared_ptr<PropertyDefinition>> mProperties;
|
||||
std::unordered_map<Uint32, std::shared_ptr<ShorthandDefinition>> mShorthands;
|
||||
#else
|
||||
UnorderedMap<Uint32, std::shared_ptr<PropertyDefinition>> mProperties;
|
||||
UnorderedMap<Uint32, std::shared_ptr<ShorthandDefinition>> mShorthands;
|
||||
#endif
|
||||
|
||||
const PropertyDefinition* addPropertyAlias( Uint32 aliasId, const PropertyDefinition* propDef );
|
||||
};
|
||||
|
||||
@@ -14,7 +14,8 @@
|
||||
#include <limits>
|
||||
#include <random>
|
||||
|
||||
#if __GNUC__ >= 11 || ( __clang__ && __clang_major__ >= 12 )
|
||||
#if ( __GNUC__ >= 11 || ( __clang__ && __clang_major__ >= 12 ) ) && \
|
||||
EE_PLATFORM != EE_PLATFORM_EMSCRIPTEN
|
||||
#define STD_SUPPORTS_FIXED_TO_CHARS
|
||||
#endif
|
||||
|
||||
|
||||
@@ -366,8 +366,7 @@ bool TextureAtlasLoader::updateTextureAtlas() {
|
||||
fs.write( reinterpret_cast<char*>( tTexHdr ), sizeof( sTextureHdr ) );
|
||||
|
||||
fs.write( reinterpret_cast<char*>( &tTexAtlas->TextureRegions[0] ),
|
||||
sizeof( sTextureRegionHdr ) *
|
||||
(std::streamsize)tTexAtlas->TextureRegions.size() );
|
||||
sizeof( sTextureRegionHdr ) * (std::size_t)tTexAtlas->TextureRegions.size() );
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
@@ -727,7 +727,7 @@ void TexturePacker::saveTextureRegions() {
|
||||
|
||||
if ( tTextureRegionsHdr.size() )
|
||||
fs.write( reinterpret_cast<const char*>( &tTextureRegionsHdr[0] ),
|
||||
sizeof( sTextureRegionHdr ) * (std::streamsize)tTextureRegionsHdr.size() );
|
||||
sizeof( sTextureRegionHdr ) * tTextureRegionsHdr.size() );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "version.hpp"
|
||||
#include <cinttypes>
|
||||
#include <eepp/core/string.hpp>
|
||||
|
||||
namespace ecode {
|
||||
@@ -13,12 +14,12 @@ Uint64 Version::getVersionNum() {
|
||||
Version ver = getVersion();
|
||||
return ECODE_VERSIONNUM( ver.major, ver.minor, ver.patch, ver.commit );
|
||||
}
|
||||
|
||||
std::string Version::getVersionNumString() {
|
||||
Version ver = getVersion();
|
||||
if ( ver.commit > 0 && ver.commit < 9999 )
|
||||
return String::format( "%d.%d.%d-%d", ver.major, ver.minor, ver.patch, ver.commit );
|
||||
return String::format( "%d.%d.%d", ver.major, ver.minor, ver.patch );
|
||||
return String::format( "%" PRIu64 ".%" PRIu64 ".%" PRIu64 "-%" PRIu64, ver.major, ver.minor,
|
||||
ver.patch, ver.commit );
|
||||
return String::format( "%" PRIu64 ".%" PRIu64 ".%" PRIu64, ver.major, ver.minor, ver.patch );
|
||||
}
|
||||
|
||||
std::string Version::getVersionFullName() {
|
||||
|
||||
Reference in New Issue
Block a user