From: Kevin Day Date: Mon, 17 Jan 2022 02:54:34 +0000 (-0600) Subject: Cleanup: Use += operation when possible. X-Git-Tag: 0.5.8~103 X-Git-Url: https://git.kevux.org/?a=commitdiff_plain;h=c09a15a442355d88d3c47cfe3ce4ac428337a1cd;p=fll Cleanup: Use += operation when possible. --- diff --git a/level_0/f_string/c/private-string.c b/level_0/f_string/c/private-string.c index ad179e2..5919c4e 100644 --- a/level_0/f_string/c/private-string.c +++ b/level_0/f_string/c/private-string.c @@ -14,7 +14,7 @@ extern "C" { } memcpy(destination->string + destination->used, source, length); - destination->used = destination->used + length; + destination->used += length; return F_none; } @@ -46,7 +46,7 @@ extern "C" { } memcpy(destination->string + destination->used, source + first, size); - destination->used = destination->used + size; + destination->used += size; } while (i + 1 < length && !source[i + 1]) { @@ -65,7 +65,7 @@ extern "C" { } memcpy(destination->string + destination->used, source + first, size); - destination->used = destination->used + size; + destination->used += size; } return F_none; @@ -350,7 +350,7 @@ extern "C" { memcpy(destination->string, source, length); } - destination->used = destination->used + length; + destination->used += length; return F_none; } #endif // !defined(_di_f_string_dynamic_mish_) || !defined(_di_f_string_dynamic_partial_mish_) || !defined(_di_f_string_dynamic_partial_prepend_assure_) || !defined(_di_f_string_dynamic_partial_prepend_) || !defined(_di_f_string_dynamic_prepend_assure_) || !defined(_di_f_string_dynamic_prepend_) || !defined(_di_f_string_mish_) || !defined(_di_f_string_prepend_assure_) || !defined(_di_f_string_prepend_) @@ -383,7 +383,7 @@ extern "C" { memmove(destination->string + offset + size, destination->string + offset, destination->used - offset); memcpy(destination->string + offset, source + first, size); - destination->used = destination->used + size; + destination->used += size; offset += size; } @@ -403,7 +403,7 @@ extern "C" { memmove(destination->string + offset + size, destination->string + offset, destination->used - offset); memcpy(destination->string + offset, source + first, size); - destination->used = destination->used + size; + destination->used += size; offset += size; } }