diff --git a/src/modules/git/Git.cpp b/src/modules/git/Git.cpp index 9a2660d1..4fdec045 100644 --- a/src/modules/git/Git.cpp +++ b/src/modules/git/Git.cpp @@ -1,6 +1,5 @@ #include "faker-cxx/Git.h" -#include #include #include "faker-cxx/Word.h" @@ -12,6 +11,7 @@ #include "faker-cxx/types/Language.h" #include "../../common/StringHelper.h" #include "../date/data/MonthNames.h" +#include "fmt/format.h" namespace faker { @@ -21,11 +21,11 @@ std::string Git::branch(unsigned maxIssueNum) switch (Number::integer(1, 3)) { case 1: - return std::format("{}-{}", Word::verb(), Word::noun()); + return fmt::format("{}-{}", Word::verb(), Word::noun()); case 2: - return std::format("{}-{}-{}", Word::verb(), Word::adjective(), Word::noun()); + return fmt::format("{}-{}-{}", Word::verb(), Word::adjective(), Word::noun()); default: - return std::format("{}-{}-{}-{}", Number::integer(unsigned (1), maxIssueNum), Word::verb(), Word::adjective(), Word::noun()); + return fmt::format("{}-{}-{}-{}", Number::integer(unsigned (1), maxIssueNum), Word::verb(), Word::adjective(), Word::noun()); } } @@ -67,7 +67,7 @@ std::string Git::commitDate(unsigned years) } - return std::format("{} {} {} {} {} {}", Date::weekdayAbbreviatedName(), monthAbbreviatedNames[size_t(std::stoi(month)-1)], day, time, year, timeZoneString); + return fmt::format("{} {} {} {} {} {}", Date::weekdayAbbreviatedName(), monthAbbreviatedNames[size_t(std::stoi(month)-1)], day, time, year, timeZoneString); } std::string Git::commitEntry(std::optional dateYears, std::optional shaLength, Language language) @@ -103,13 +103,13 @@ std::string Git::commitMessage() switch (Number::integer(1, 4)) { case 1: - return std::format("{} {}", Word::verb(), Word::noun()); + return fmt::format("{} {}", Word::verb(), Word::noun()); case 2: - return std::format("{} {} {}", Word::verb(), Word::adjective(), Word::noun()); + return fmt::format("{} {} {}", Word::verb(), Word::adjective(), Word::noun()); case 3: - return std::format("{} {} {}", Word::verb(), Word::noun(), Word::adverb()); + return fmt::format("{} {} {}", Word::verb(), Word::noun(), Word::adverb()); default: - return std::format("{} {} {} {}", Word::verb(), Word::adjective(), Word::noun(), Word::adverb()); + return fmt::format("{} {} {} {}", Word::verb(), Word::adjective(), Word::noun(), Word::adverb()); } } diff --git a/src/modules/git/GitTest.cpp b/src/modules/git/GitTest.cpp index 1d1930e5..63387c56 100644 --- a/src/modules/git/GitTest.cpp +++ b/src/modules/git/GitTest.cpp @@ -4,7 +4,6 @@ #include "gtest/gtest.h" -#include #include #include #include