mirror of
https://github.com/WerWolv/ImHex-Patterns.git
synced 2026-03-30 05:05:18 -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:
@@ -165,16 +165,16 @@ namespace auto std::string {
|
||||
@param string The string to reverse.
|
||||
@return The reversed string.
|
||||
*/
|
||||
fn reverse(str string) {
|
||||
fn reverse(str string) {
|
||||
str result;
|
||||
|
||||
|
||||
s32 i;
|
||||
i = std::string::length(string);
|
||||
while (i > 0) {
|
||||
i = i - 1;
|
||||
result = result + std::string::at(string, i);
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
@@ -185,23 +185,23 @@ namespace auto std::string {
|
||||
*/
|
||||
fn to_upper(str string) {
|
||||
str result;
|
||||
|
||||
|
||||
u32 i;
|
||||
char c;
|
||||
while (i < std::string::length(string)) {
|
||||
c = std::string::at(string, i);
|
||||
|
||||
|
||||
if (c >= 'a' && c <= 'z')
|
||||
result = result + char(c - 0x20);
|
||||
else
|
||||
result = result + c;
|
||||
|
||||
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
Converts a string to lower case.
|
||||
@param string The string to convert.
|
||||
@@ -209,20 +209,20 @@ namespace auto std::string {
|
||||
*/
|
||||
fn to_lower(str string) {
|
||||
str result;
|
||||
|
||||
|
||||
u32 i;
|
||||
char c;
|
||||
while (i < std::string::length(string)) {
|
||||
c = std::string::at(string, i);
|
||||
|
||||
|
||||
if (c >= 'A' && c <= 'Z')
|
||||
result = result + char(c + 0x20);
|
||||
else
|
||||
result = result + c;
|
||||
|
||||
|
||||
i = i + 1;
|
||||
}
|
||||
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user