From 20b16ddf053733271f8cf0966f2a5c5b6ac2a8a1 Mon Sep 17 00:00:00 2001
From: Andrey Kleshchev <andreykproductengine@lindenlab.com>
Date: Mon, 16 Jan 2023 19:52:20 +0200
Subject: [PATCH] MacOS Build fix

---
 indra/llcommon/llallocator_heap_profile.cpp | 1 -
 indra/llcommon/llstring.h                   | 6 +++---
 2 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/indra/llcommon/llallocator_heap_profile.cpp b/indra/llcommon/llallocator_heap_profile.cpp
index 6dd399e1e35..c6d9542b428 100644
--- a/indra/llcommon/llallocator_heap_profile.cpp
+++ b/indra/llcommon/llallocator_heap_profile.cpp
@@ -130,7 +130,6 @@ void LLAllocatorHeapProfile::parse(std::string const & prof_text)
 
 void LLAllocatorHeapProfile::dump(std::ostream & out) const
 {
-    lines_t::const_iterator i;
 	for (const LLAllocatorHeapProfile::line& line : mLines)
     {
         out << line.mLiveCount << ": " << line.mLiveSize << '[' << line.mTotalCount << ": " << line.mTotalSize << "] @";
diff --git a/indra/llcommon/llstring.h b/indra/llcommon/llstring.h
index 7ba5c8c2414..1fd6cac14a6 100644
--- a/indra/llcommon/llstring.h
+++ b/indra/llcommon/llstring.h
@@ -1668,13 +1668,13 @@ std::basic_string<T> LLStringUtilBase<T>::quote(const string_type& str,
 	// For whatever reason, we must quote this string.
 	string_type result;
 	result.push_back('"');
-	for (typename const S8 c : str)
+	for (typename string_type::const_iterator ci(str.begin()), cend(str.end()); ci != cend; ++ci)
 	{
-		if (c == '"')
+		if (*ci == '"')
 		{
 			result.append(escape);
 		}
-		result.push_back(c);
+		result.push_back(*ci);
 	}
 	result.push_back('"');
 	return result;
-- 
GitLab