# HG changeset patch # User frosch # Date 2022-11-05 16:14:10 # Node ID 468698ef10189cda441d4777a42d85d2691b83f0 # Parent b0d1f4122948faf2ee142462987a05413080a7cc Codechange: SetDParamStr borrows contents from std::string::c_str(). Prevent calling it with temporaries. (#10136) diff --git a/src/strings_func.h b/src/strings_func.h --- a/src/strings_func.h +++ b/src/strings_func.h @@ -203,6 +203,7 @@ void SetDParamMaxDigits(uint n, uint cou 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);