Codechange: SetDParamStr borrows contents from std::string::c_str(). Prevent calling it with temporaries. (#10136)

This commit is contained in:
frosch 2022-11-05 17:14:10 +01:00 committed by GitHub
parent 21cea308f9
commit fea6a34684
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -203,6 +203,7 @@ void SetDParamMaxDigits(uint n, uint count, FontSize size = FS_NORMAL);
void SetDParamStr(uint n, const char *str);
void SetDParamStr(uint n, const std::string &str);
void SetDParamStr(uint n, std::string &&str) = delete; // block passing temporaries to SetDParamStr
void CopyInDParam(int offs, const uint64 *src, int num);
void CopyOutDParam(uint64 *dst, int offs, int num);