Skip to content

Commit 68d427c

Browse files
author
Requiem
committed
updated CPP directive in conclusion template argument handler
1 parent 5080cdc commit 68d427c

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

src/vmaware.hpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11497,7 +11497,7 @@ struct VM {
1149711497
constexpr const char* very_unlikely = "Very unlikely a VM";
1149811498
constexpr const char* unlikely = "Unlikely a VM";
1149911499

11500-
#if __cplusplus > 201703L
11500+
#if (CPP >= 17)
1150111501
constexpr std::string_view potentially = "Potentially";
1150211502
constexpr std::string_view might = "Might be";
1150311503
constexpr std::string_view likely = "Likely";
@@ -11536,10 +11536,9 @@ struct VM {
1153611536
(brand_tmp == brands::AMD_SEV_SNP) ||
1153711537
(brand_tmp == brands::NSJAIL) ||
1153811538
(brand_tmp == brands::NULL_BRAND)
11539-
) {
11539+
) {
1154011540
article = " an ";
11541-
}
11542-
else {
11541+
} else {
1154311542
article = " a ";
1154411543
}
1154511544

@@ -11556,23 +11555,22 @@ struct VM {
1155611555
else {
1155711556
return std::string(category) + article + brand_tmp + " VM";
1155811557
}
11559-
};
11558+
};
1156011559

1156111560
if (core::is_enabled(flags, DYNAMIC)) {
11562-
if (percent_tmp == 0) { return baremetal; }
11561+
if (percent_tmp == 0) { return baremetal; }
1156311562
else if (percent_tmp <= 20) { return very_unlikely; }
1156411563
else if (percent_tmp <= 35) { return unlikely; }
11565-
else if (percent_tmp < 50) { return make_conclusion(potentially); }
11564+
else if (percent_tmp < 50) { return make_conclusion(potentially); }
1156611565
else if (percent_tmp <= 62) { return make_conclusion(might); }
1156711566
else if (percent_tmp <= 75) { return make_conclusion(likely); }
1156811567
else if (percent_tmp < 100) { return make_conclusion(very_likely); }
11569-
else { return make_conclusion(inside_vm); }
11568+
else { return make_conclusion(inside_vm); }
1157011569
}
1157111570

1157211571
if (percent_tmp == 100) {
1157311572
return make_conclusion(inside_vm);
11574-
}
11575-
else {
11573+
} else {
1157611574
return baremetal;
1157711575
}
1157811576
}

0 commit comments

Comments
 (0)