From f2825eb174edff6d7c5538163c42140e371fae39 Mon Sep 17 00:00:00 2001 From: Clare Macrae Date: Fri, 25 Feb 2022 16:25:33 +0000 Subject: [PATCH] R Fix warning C4459 in MSVC with /W4 - see #193 Co-Authored-By: Llewellyn Falco --- ...arateApprovedAndReceivedDirectoriesNamer.cpp | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/ApprovalTests/namers/SeparateApprovedAndReceivedDirectoriesNamer.cpp b/ApprovalTests/namers/SeparateApprovedAndReceivedDirectoriesNamer.cpp index 1284bf12..8dcb21f0 100644 --- a/ApprovalTests/namers/SeparateApprovedAndReceivedDirectoriesNamer.cpp +++ b/ApprovalTests/namers/SeparateApprovedAndReceivedDirectoriesNamer.cpp @@ -3,14 +3,19 @@ namespace ApprovalTests { - // clang-format off - // begin-snippet: separate_approved_and_received_directory_names - auto path = "{TestSourceDirectory}/{ApprovalsSubdirectory}/{ApprovedOrReceived}/{TestFileName}.{TestCaseName}.{FileExtension}"; - // end-snippet - // clang-format on + std::string separateDirectoryPath() + { + // clang-format off + // begin-snippet: separate_approved_and_received_directory_names + auto path = "{TestSourceDirectory}/{ApprovalsSubdirectory}/{ApprovedOrReceived}/{TestFileName}.{TestCaseName}.{FileExtension}"; + // end-snippet + // clang-format on + return path; + } + SeparateApprovedAndReceivedDirectoriesNamer:: SeparateApprovedAndReceivedDirectoriesNamer() - : TemplatedCustomNamer(path) + : TemplatedCustomNamer(separateDirectoryPath()) { }