We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 74bf395 commit bc14da6Copy full SHA for bc14da6
Sources/_TestingInternals/Versions.cpp
@@ -28,13 +28,11 @@ const char *swt_getTestingLibraryVersion(void) {
28
#pragma clang diagnostic pop
29
};
30
31
- // Trim any trailing whitespace.
+ // Zero any trailing characters (e.g. the copyright block.)
32
static std::once_flag once;
33
std::call_once(once, [] {
34
auto i = std::find_if(std::begin(version), std::end(version), isspace);
35
- if (i != std::end(version)) {
36
- *i = '\0';
37
- }
+ std::fill(i, std::end(version), '\0');
38
});
39
40
return version;
0 commit comments