From f11622177e6f3ad0d0c81bde20a2a71863024a49 Mon Sep 17 00:00:00 2001 From: Sandu Liviu Catalin Date: Sat, 20 Mar 2021 11:49:26 +0200 Subject: [PATCH] Return by reference. --- module/Misc/Vehicle.cpp | 2 +- module/Misc/Vehicle.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/module/Misc/Vehicle.cpp b/module/Misc/Vehicle.cpp index 64f83ad1..17d4ab96 100644 --- a/module/Misc/Vehicle.cpp +++ b/module/Misc/Vehicle.cpp @@ -82,7 +82,7 @@ struct InitCustomVehicleNames } g_InitCustomVehicleNames{}; // ------------------------------------------------------------------------------------------------ -String GetAutomobileName(uint32_t id) +String & GetAutomobileName(uint32_t id) { if (id > 129 && id < 237) { diff --git a/module/Misc/Vehicle.hpp b/module/Misc/Vehicle.hpp index 142a6edf..334e30d4 100644 --- a/module/Misc/Vehicle.hpp +++ b/module/Misc/Vehicle.hpp @@ -9,7 +9,7 @@ namespace SqMod { /* ------------------------------------------------------------------------------------------------ * Retrieve the name associated with a vehicle model identifier. */ -SQMOD_NODISCARD String GetAutomobileName(uint32_t id); +SQMOD_NODISCARD String & GetAutomobileName(uint32_t id); /* ------------------------------------------------------------------------------------------------ * Modify the name associated with a vehicle model identifier.