Updated ozz-animation to version 0.14.1 @35b2efd4
This commit is contained in:
+11
-1
@@ -1,4 +1,6 @@
|
||||
add_library(ozz_base STATIC
|
||||
|
||||
add_library(ozz_base
|
||||
${PROJECT_SOURCE_DIR}/include/ozz/base/export.h
|
||||
${PROJECT_SOURCE_DIR}/include/ozz/base/endianness.h
|
||||
${PROJECT_SOURCE_DIR}/include/ozz/base/gtest_helper.h
|
||||
${PROJECT_SOURCE_DIR}/include/ozz/base/memory/allocator.h
|
||||
@@ -54,11 +56,19 @@ add_library(ozz_base STATIC
|
||||
maths/soa_math_archive.cc
|
||||
${PROJECT_SOURCE_DIR}/include/ozz/base/maths/simd_math_archive.h
|
||||
maths/simd_math_archive.cc)
|
||||
|
||||
target_compile_definitions(ozz_base
|
||||
PUBLIC $<$<BOOL:${BUILD_SHARED_LIBS}>:OZZ_USE_DYNAMIC_LINKING>
|
||||
PRIVATE $<$<BOOL:${BUILD_SHARED_LIBS}>:OZZ_BUILD_BASE_LIB>)
|
||||
|
||||
target_compile_options(ozz_base PUBLIC $<$<CXX_COMPILER_ID:MSVC>:/wd4251>)
|
||||
target_include_directories(ozz_base PUBLIC
|
||||
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
|
||||
$<INSTALL_INTERFACE:$<INSTALL_PREFIX>/include>)
|
||||
|
||||
set_target_properties(ozz_base PROPERTIES FOLDER "ozz")
|
||||
|
||||
install(TARGETS ozz_base DESTINATION lib)
|
||||
|
||||
fuse_target("ozz_base")
|
||||
|
||||
|
||||
+5
-3
@@ -182,7 +182,7 @@ int MemoryStream::Seek(int _offset, Origin _origin) {
|
||||
|
||||
// Exit if seeking before file begin or beyond max file size.
|
||||
if (origin < -_offset ||
|
||||
(_offset > 0 && origin > static_cast<int>(kMaxSize - _offset))) {
|
||||
(_offset > 0 && origin > static_cast<int>(kMaxSize) - _offset)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -204,9 +204,11 @@ bool MemoryStream::Resize(size_t _size) {
|
||||
(MemoryStream::kBufferSizeIncrement & (kBufferSizeIncrement - 1)) == 0,
|
||||
"kBufferSizeIncrement must be a power of 2");
|
||||
const size_t new_size = ozz::Align(_size, kBufferSizeIncrement);
|
||||
char* new_buffer = reinterpret_cast<char*>(
|
||||
byte* new_buffer = reinterpret_cast<byte*>(
|
||||
ozz::memory::default_allocator()->Allocate(new_size, 16));
|
||||
std::memcpy(new_buffer, buffer_, alloc_size_);
|
||||
if (buffer_ != nullptr) {
|
||||
std::memcpy(new_buffer, buffer_, alloc_size_);
|
||||
}
|
||||
ozz::memory::default_allocator()->Deallocate(buffer_);
|
||||
buffer_ = new_buffer;
|
||||
alloc_size_ = new_size;
|
||||
|
||||
Reference in New Issue
Block a user