mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-26 22:38:30 +00:00
Rerun clang-format on the repo (#1217)
🚨 clang-format changes output per version!
This is with version 19.0.0. The modifications seem to be fixing the old
version’s errors - mainly involving omitted whitespace around binary ops
and inserted whitespace between goto labels and colons (if followed by a
curly brace.)
Also fixes a few mistakes made by e.g. someone (ahem) forgetting to pass
his ctl/string.h modifications through it.
We should add this to .git-blame-ignore-revs once we have its final hash
on master.
This commit is contained in:
parent
8e37ee2598
commit
89fc95fefd
38 changed files with 139 additions and 122 deletions
10
ctl/string.h
10
ctl/string.h
|
@ -83,7 +83,7 @@ class string
|
|||
{
|
||||
__builtin_memset(blob, 0, sizeof(size_t) * 2);
|
||||
// equivalent to set_small_size(0) but also zeroes memory
|
||||
*(((size_t *)blob) + 2) = __::sso_max << (sizeof(size_t) - 1) * 8;
|
||||
*(((size_t*)blob) + 2) = __::sso_max << (sizeof(size_t) - 1) * 8;
|
||||
}
|
||||
|
||||
void swap(string& s) noexcept
|
||||
|
@ -293,13 +293,13 @@ class string
|
|||
*(blob + __::sso_max) = (__::sso_max - size);
|
||||
}
|
||||
|
||||
inline void set_big_string(char *p, size_t n, size_t c2) noexcept
|
||||
inline void set_big_string(char* p, size_t n, size_t c2) noexcept
|
||||
{
|
||||
if (c2 > __::big_mask)
|
||||
__builtin_trap();
|
||||
*(char **)blob = p;
|
||||
*(((size_t *)blob) + 1) = n;
|
||||
*(((size_t *)blob) + 2) = c2 | ~__::big_mask;
|
||||
*(char**)blob = p;
|
||||
*(((size_t*)blob) + 1) = n;
|
||||
*(((size_t*)blob) + 2) = c2 | ~__::big_mask;
|
||||
}
|
||||
|
||||
inline __::small_string* small() noexcept
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue