Merge pull request #12798 from mitaclaw/branch-watch-tool-fixes-2

Branch Watch Tool: Optimizations
This commit is contained in:
Admiral H. Curtiss
2024-06-15 16:57:05 +02:00
committed by GitHub
5 changed files with 34 additions and 7 deletions

View File

@ -144,6 +144,7 @@ add_library(common
TraversalClient.h
TraversalProto.h
TypeUtils.h
Unreachable.h
UPnP.cpp
UPnP.h
VariantUtil.h

View File

@ -0,0 +1,21 @@
// Copyright 2024 Dolphin Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#pragma once
#include "Common/CommonFuncs.h"
namespace Common
{
// TODO C++23: Replace with std::unreachable.
[[noreturn]] inline void Unreachable()
{
#ifdef _DEBUG
Crash();
#elif defined(_MSC_VER) && !defined(__clang__)
__assume(false);
#else
__builtin_unreachable();
#endif
}
} // namespace Common