Reconstruct readable C++ and organize cohesive source subsystems
Administrative source import: native x86 compilation passed for 423 authored units. Source placement and submission states are migrated separately; this commit does not imply peer acceptance.
Previous head: 35d2a8cb36
Payload SHA256: 592f016d2730c5593bb653aa054c1e5f76a6df72c8f5a09e66f74876e2e33dee
This commit is contained in:
parent
35d2a8cb36
commit
a47d20f8be
890 changed files with 11796 additions and 16664 deletions
|
|
@ -1,5 +1,5 @@
|
|||
#include "File/CommonObject.h"
|
||||
#include "Resource/BitmapResource.h"
|
||||
#include "Resource/Bitmap/BitmapResource.h"
|
||||
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
|
|
@ -31,17 +31,13 @@ bool CCommonObject::LoadTokens(std::vector<char*>& tokens, const char* name, int
|
|||
tokens.reserve(4096);
|
||||
}
|
||||
|
||||
// ResourceBytes supplies the original resolved, archive-aware read boundary.
|
||||
// No loose-file fallback is hidden in this table parser.
|
||||
if (!file.Open(name)) {
|
||||
file.Close();
|
||||
return false;
|
||||
}
|
||||
|
||||
const auto bytes = static_cast<unsigned>(file.Size());
|
||||
std::unique_ptr<char, decltype(&std::free)> buffer(
|
||||
static_cast<char*>(std::malloc(static_cast<std::size_t>(bytes) + 1)), &std::free
|
||||
);
|
||||
std::unique_ptr<char, decltype(&std::free)> buffer(static_cast<char*>(std::malloc(static_cast<std::size_t>(bytes) + 1)), &std::free);
|
||||
|
||||
if (!buffer) {
|
||||
file.Close();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue