mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-27 23:37:04 -05:00
git: Various style fixes everywhere, removing whitespaces (#321)
* repo-wide: trim trailing spaces Note: This doesn't touch the .tbl files in encodings/ since they include meaningful trailing spaces (`20= `) * patterns: clean up duplicate semicolons * ELF: add header magic check * glTF: use type::Magic for magic value * glTF: check that the file size in the header matches * xgstexture: fix generics syntax for magic value * JPEG: define hex enum with 0x00 instead of 0X00 * CI: update deprecated actions --------- Co-authored-by: Nik <werwolv98@gmail.com>
This commit is contained in:
@@ -15,7 +15,7 @@ namespace impl {
|
||||
res |= array[sizeof(array)-1] & 0x7f;
|
||||
return res;
|
||||
};
|
||||
|
||||
|
||||
fn format_Size(auto leb128) {
|
||||
u128 res = impl::transform_Size_array(leb128.array);
|
||||
return std::format("{} ({:#x})", res, res);
|
||||
@@ -24,18 +24,18 @@ namespace impl {
|
||||
fn transform_Size(auto leb128) {
|
||||
return impl::transform_Size_array(leb128.array);
|
||||
};
|
||||
|
||||
|
||||
fn format_LuaString(auto string) {
|
||||
if (string.size == 0) {
|
||||
return "None";
|
||||
}
|
||||
return std::format("\"{}\"", string.data);
|
||||
};
|
||||
|
||||
|
||||
fn format_Constant(auto constant) {
|
||||
return constant.data;
|
||||
};
|
||||
|
||||
|
||||
fn format_Version(auto ver) {
|
||||
return std::format("Ver. {}.{}", ver.major, ver.minor);
|
||||
};
|
||||
@@ -47,7 +47,7 @@ using LuaFunction;
|
||||
struct Size {
|
||||
u8 array[while(addressof(this) == $ || ((addressof(this)-$ < 9) && (std::mem::read_unsigned($-1, 1) & 0x80 == 0)))] [[hidden]];
|
||||
} [[sealed, format("impl::format_Size"), transform("impl::transform_Size")]];
|
||||
|
||||
|
||||
|
||||
bitfield Version {
|
||||
minor : 4;
|
||||
|
||||
Reference in New Issue
Block a user