Skip to content

Commit 8f2fe54

Browse files
committed
Code review fixes
1 parent bd8b99b commit 8f2fe54

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Source/astcenccli_platform_dependents.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,9 +151,9 @@ void set_thread_name(
151151
const char* name
152152
) {
153153
// Names are limited to 16 characters
154-
wchar_t wname [17] { 0 };
154+
wchar_t wname [16] { 0 };
155155
size_t name_len = std::strlen(name);
156-
size_t clamp_len = std::min(name_len, static_cast<size_t>(16));
156+
size_t clamp_len = std::min<size_t>(name_len, 15);
157157

158158
// We know we only have basic 7-bit ASCII so just widen
159159
for (size_t i = 0; i < clamp_len; i++)

Source/astcenccli_toplevel.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ static void compression_workload_runner(
232232
) {
233233
(void)thread_count;
234234

235-
char name[17] { 0 };
235+
char name[16] { 0 };
236236
std::snprintf(name, 16, "astc workc %d", thread_id);
237237
set_thread_name(name);
238238

@@ -263,7 +263,7 @@ static void decompression_workload_runner(
263263
) {
264264
(void)thread_count;
265265

266-
char name[17] { 0 };
266+
char name[16] { 0 };
267267
std::snprintf(name, 16, "astc workd %d", thread_id);
268268
set_thread_name(name);
269269

0 commit comments

Comments
 (0)