From ad244540845adf09b425783b5757dc6911d9e072 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Tue, 18 Oct 2022 12:30:15 +0100 Subject: Fix an unintentional string copy in the geolocation API. --- include/modules/geolocation.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/modules') diff --git a/include/modules/geolocation.h b/include/modules/geolocation.h index f6363ba40..382a4f0d7 100644 --- a/include/modules/geolocation.h +++ b/include/modules/geolocation.h @@ -73,8 +73,8 @@ private: } /** Retrieves the two character country code for this location. */ - std::string GetCode() const { return code; } + const std::string& GetCode() const { return code; } /** Retrieves the country name for this location. */ - std::string GetName() const { return name; } + const std::string& GetName() const { return name; } }; -- cgit v1.3.1-10-gc9f91