Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2f16a69

Browse files
committed
Updated assert_fatal
1 parent1ecc00f commit2f16a69

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

‎buildcc/lib/env/include/env/assert_fatal.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ namespace buildcc::env {
3131
* exit)
3232
* During Unit Test -> throw std::exception
3333
*/
34-
voidassert_handle_fatal();
34+
[[noreturn]]voidassert_handle_fatal();
3535

3636
/**
3737
* @brief Compile time expr asserts fatally when false

‎buildcc/lib/env/mock/assert_fatal.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44

55
namespacebuildcc::env {
66

7-
voidassert_handle_fatal() {throwstd::exception(); }
7+
[[noreturn]]voidassert_handle_fatal() {throwstd::exception(); }
88

99
}// namespace buildcc::env

‎buildcc/lib/env/src/assert_fatal.cpp‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ bool IsRunningOnThread() {
3535

3636
namespacebuildcc::env {
3737

38-
voidassert_handle_fatal() {
38+
[[noreturn]]voidassert_handle_fatal() {
3939
if (!IsRunningOnThread()) {
4040
std::exit(1);
41+
}else {
42+
throwstd::exception();
4143
}
42-
43-
throwstd::exception();
4444
}
4545

4646
}// namespace buildcc::env

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp