2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 14:45:14 +00:00

Added Guideline Support Library as a dependency.

See https://github.com/Microsoft/GSL for information.
This commit is contained in:
John Preston
2017-03-04 11:59:10 +03:00
parent 0838d21a05
commit 12bbd971b3
13 changed files with 78 additions and 20 deletions

View File

@@ -748,15 +748,13 @@ namespace internal {
};
std::unique_ptr<SomeAllocatedMemoryChunk> SomeAllocatedMemory;
void OperatorNewHandler() {
std::set_new_handler(nullptr);
SomeAllocatedMemory.reset();
t_assert(!"Could not allocate!");
}
void InstallOperatorNewHandler() {
SomeAllocatedMemory = std::make_unique<SomeAllocatedMemoryChunk>();
std::set_new_handler(OperatorNewHandler);
std::set_new_handler([] {
std::set_new_handler(nullptr);
SomeAllocatedMemory.reset();
t_assert(!"Could not allocate!");
});
}
Qt::HANDLE ReportingThreadId = nullptr;