From bbf0f52e6d64e35913f5fb39610580678bd55833 Mon Sep 17 00:00:00 2001 From: Erika Harrison Date: Mon, 21 Aug 2023 15:21:14 -0600 Subject: [PATCH 1/2] Include needed for std::sort --- pxr/base/tf/testenv/notice.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pxr/base/tf/testenv/notice.cpp b/pxr/base/tf/testenv/notice.cpp index f20d504091..b46d9a6f05 100644 --- a/pxr/base/tf/testenv/notice.cpp +++ b/pxr/base/tf/testenv/notice.cpp @@ -31,6 +31,7 @@ #include "pxr/base/tf/weakPtr.h" #include "pxr/base/arch/systemInfo.h" +#include #include #include #include @@ -112,7 +113,7 @@ std::mutex mainThreadLock; static void _DumpLog(ostream *log, vector *li, std::mutex *mutex) { std::lock_guard lock(*mutex); - sort(li->begin(), li->end()); + std::sort(li->begin(), li->end()); for(vector::const_iterator n = li->begin(); n != li->end(); ++ n) { *log << *n << endl; From d70e4a6524fc9ceed44b4b5790b9798786a2efc1 Mon Sep 17 00:00:00 2001 From: Erika Harrison Date: Wed, 23 Aug 2023 15:00:18 -0600 Subject: [PATCH 2/2] Add function comment --- pxr/base/tf/testenv/notice.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/pxr/base/tf/testenv/notice.cpp b/pxr/base/tf/testenv/notice.cpp index b46d9a6f05..797052eacc 100644 --- a/pxr/base/tf/testenv/notice.cpp +++ b/pxr/base/tf/testenv/notice.cpp @@ -110,6 +110,7 @@ vector mainThreadList; std::mutex workerThreadLock; std::mutex mainThreadLock; +// Helper to lock and print the list of log strings alphabetically; then clear the list static void _DumpLog(ostream *log, vector *li, std::mutex *mutex) { std::lock_guard lock(*mutex);