Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit81a2d51

Browse files
Simplify String::concat(char)
Now concat(const char*, unsigned int) no longer requires anul-terminated string, we can simplify the concat(char) method to justpass the address of the single character instead of having to createbuffer with nul-termination.
1 parent59dd995 commit81a2d51

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

‎api/String.cpp‎

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,7 @@ unsigned char String::concat(const char *cstr)
297297

298298
unsignedcharString::concat(char c)
299299
{
300-
char buf[2];
301-
buf[0] = c;
302-
buf[1] =0;
303-
returnconcat(buf,1);
300+
returnconcat(&c,1);
304301
}
305302

306303
unsignedcharString::concat(unsignedchar num)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp