xenia-base: Use unique_ptr constructor rather than make_unique to support GCC 4.8.4
This commit is contained in:
parent
56d727a024
commit
af493ffbc7
|
@ -33,7 +33,8 @@ class MappedMemory {
|
|||
virtual ~MappedMemory() = default;
|
||||
|
||||
std::unique_ptr<MappedMemory> Slice(Mode mode, size_t offset, size_t length) {
|
||||
return std::make_unique<MappedMemory>(path_, mode, data() + offset, length);
|
||||
return std::unique_ptr<MappedMemory>(
|
||||
new MappedMemory(path_, mode, data() + offset, length));
|
||||
}
|
||||
|
||||
uint8_t* data() const { return reinterpret_cast<uint8_t*>(data_); }
|
||||
|
|
|
@ -50,7 +50,8 @@ std::unique_ptr<MappedMemory> MappedMemory::Open(const std::wstring& path,
|
|||
break;
|
||||
}
|
||||
|
||||
auto mm = std::make_unique<PosixMappedMemory>(path, mode);
|
||||
auto mm =
|
||||
std::unique_ptr<PosixMappedMemory>(new PosixMappedMemory(path, mode));
|
||||
|
||||
mm->file_handle = fopen(xe::to_string(path).c_str(), mode_str);
|
||||
if (!mm->file_handle) {
|
||||
|
|
|
@ -112,7 +112,8 @@ struct ThreadStartData {
|
|||
std::function<void()> start_routine;
|
||||
};
|
||||
void* ThreadStartRoutine(void* parameter) {
|
||||
current_thread_ = std::make_unique<PosixThread>(::pthread_self());
|
||||
current_thread_ =
|
||||
std::unique_ptr<PosixThread>(new PosixThread(::pthread_self()));
|
||||
|
||||
auto start_data = reinterpret_cast<ThreadStartData*>(parameter);
|
||||
start_data->start_routine();
|
||||
|
@ -137,7 +138,7 @@ std::unique_ptr<Thread> Thread::Create(CreationParameters params,
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
return std::make_unique<PosixThread>(handle);
|
||||
return std::unique_ptr<PosixThread>(new PosixThread(handle));
|
||||
}
|
||||
|
||||
} // namespace threading
|
||||
|
|
Loading…
Reference in New Issue