mirror of https://github.com/OpenTTD/OpenTTD
Codechange: replace char* where out-of-date
parent
d697280493
commit
3f2b39e3f8
|
@ -1278,7 +1278,7 @@ bool NetworkValidateClientName(std::string &client_name)
|
|||
* Convenience method for NetworkValidateClientName on _settings_client.network.client_name.
|
||||
* It trims the client name and checks whether it is empty. When it is empty
|
||||
* an error message is shown to the GUI user.
|
||||
* See \c NetworkValidateClientName(char*) for details about the functionality.
|
||||
* See \c NetworkValidateClientName(std::string&) for details about the functionality.
|
||||
* @return True iff the client name is valid.
|
||||
*/
|
||||
bool NetworkValidateOurClientName()
|
||||
|
|
|
@ -657,7 +657,7 @@ enum VarTypes : uint16_t {
|
|||
SLE_VAR_NULL = 9 << 4, ///< useful to write zeros in savegame.
|
||||
SLE_VAR_STR = 12 << 4, ///< string pointer
|
||||
SLE_VAR_STRQ = 13 << 4, ///< string pointer enclosed in quotes
|
||||
SLE_VAR_NAME = 14 << 4, ///< old custom name to be converted to a char pointer
|
||||
SLE_VAR_NAME = 14 << 4, ///< old custom name to be converted to a string pointer
|
||||
/* 1 more possible memory-primitives */
|
||||
|
||||
/* Shortcut values */
|
||||
|
|
|
@ -39,7 +39,7 @@ struct Filtering {
|
|||
* @tparam P Tyoe of data passed as additional parameter to the sort function.
|
||||
* @tparam F Type of data fed as additional value to the filter function. @see FilterFunction
|
||||
*/
|
||||
template <typename T, typename P = std::nullptr_t, typename F = const char*>
|
||||
template <typename T, typename P = std::nullptr_t, typename F = std::string_view>
|
||||
class GUIList : public std::vector<T> {
|
||||
public:
|
||||
using SortFunction = std::conditional_t<std::is_same_v<P, std::nullptr_t>, bool (const T&, const T&), bool (const T&, const T&, const P)>; ///< Signature of sort function.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/** @file string.cpp Handling of C-type strings (char*). */
|
||||
/** @file string.cpp Handling of strings (std::string/std::string_view). */
|
||||
|
||||
#include "stdafx.h"
|
||||
#include "debug.h"
|
||||
|
|
Loading…
Reference in New Issue