From 2207baaa04c97730e6eaa184aa4f3c4e6537e0d1 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Wed, 5 Dec 2018 02:36:43 -0500 Subject: ng_word: Deduplicate use of a constant value We've already given the constant to the vector itself, so we don't need to re-hardcode it in the array. --- src/core/file_sys/system_archive/ng_word.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/file_sys/system_archive/ng_word.cpp b/src/core/file_sys/system_archive/ng_word.cpp index d0acdbd49..a24f1e496 100644 --- a/src/core/file_sys/system_archive/ng_word.cpp +++ b/src/core/file_sys/system_archive/ng_word.cpp @@ -26,7 +26,7 @@ constexpr std::array WORD_TXT{ VirtualDir NgWord1() { std::vector files(NgWord1Data::NUMBER_WORD_TXT_FILES); - for (std::size_t i = 0; i < NgWord1Data::NUMBER_WORD_TXT_FILES; ++i) { + for (std::size_t i = 0; i < files.size(); ++i) { files[i] = std::make_shared>( NgWord1Data::WORD_TXT, fmt::format("{}.txt", i)); } -- cgit v1.2.3