diff options
author | Oz Linden <oz@lindenlab.com> | 2013-04-12 12:10:24 -0400 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-04-12 12:10:24 -0400 |
commit | edf5b6a8b71d9c4c01ce9c975864d4525cd7350c (patch) | |
tree | 68310a6824451c8c6f3af8ef73f2f9ec17c3a467 /indra/llvfs | |
parent | 01fb17cbc5a1d6a3526c4115787dbae74f7bdb07 (diff) | |
parent | 460c81070e5fa1c51ce7e186a9ecb8c5f1c995e1 (diff) |
pull changes for Sunshine beta
Diffstat (limited to 'indra/llvfs')
-rw-r--r-- | indra/llvfs/CMakeLists.txt | 6 | ||||
-rw-r--r-- | indra/llvfs/llvfile.cpp | 7 |
2 files changed, 8 insertions, 5 deletions
diff --git a/indra/llvfs/CMakeLists.txt b/indra/llvfs/CMakeLists.txt index 3c68b279f7..67dce8c073 100644 --- a/indra/llvfs/CMakeLists.txt +++ b/indra/llvfs/CMakeLists.txt @@ -8,6 +8,7 @@ include(UnixInstall) include_directories( ${LLCOMMON_INCLUDE_DIRS} + ${LLCOMMON_SYSTEM_INCLUDE_DIRS} ) set(llvfs_SOURCE_FILES @@ -44,12 +45,12 @@ if (LINUX) LIST(APPEND llvfs_SOURCE_FILES lldir_linux.cpp) LIST(APPEND llvfs_HEADER_FILES lldir_linux.h) - if (VIEWER AND INSTALL) + if (INSTALL) set_source_files_properties(lldir_linux.cpp PROPERTIES COMPILE_FLAGS "-DAPP_RO_DATA_DIR=\\\"${APP_SHARE_DIR}\\\"" ) - endif (VIEWER AND INSTALL) + endif (INSTALL) endif (LINUX) if (WINDOWS) @@ -70,6 +71,7 @@ set(vfs_BOOST_LIBRARIES ) target_link_libraries(llvfs + ${LLCOMMON_LIBRARIES} ${vfs_BOOST_LIBRARIES} ) diff --git a/indra/llvfs/llvfile.cpp b/indra/llvfs/llvfile.cpp index ca749c5eaf..03d2cc25e3 100644 --- a/indra/llvfs/llvfile.cpp +++ b/indra/llvfs/llvfile.cpp @@ -32,6 +32,7 @@ #include "llthread.h" #include "llstat.h" #include "llvfs.h" +#include "llmemory.h" const S32 LLVFile::READ = 0x00000001; const S32 LLVFile::WRITE = 0x00000002; @@ -134,13 +135,13 @@ U8* LLVFile::readFile(LLVFS *vfs, const LLUUID &uuid, LLAssetType::EType type, S data = NULL; } else - { - data = new U8[file_size]; + { + data = (U8*) ll_aligned_malloc_16(file_size); file.read(data, file_size); /* Flawfinder: ignore */ if (file.getLastBytesRead() != (S32)file_size) { - delete[] data; + ll_aligned_free(data); data = NULL; file_size = 0; } |