Skip to content

Commit

Permalink
refactor: refactor word data into single file (#700)
Browse files Browse the repository at this point in the history
  • Loading branch information
cieslarmichal authored Jun 19, 2024
1 parent cff6c23 commit c21f98b
Show file tree
Hide file tree
Showing 14 changed files with 14,395 additions and 14,449 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ set(FAKER_SOURCES
src/modules/weather/Weather.cpp
src/modules/weather/WeatherData.cpp
src/modules/word/Word.cpp
src/modules/word/WordData.cpp
src/common/FormatHelper.cpp
src/common/LuhnCheck.cpp
src/common/StringHelper.cpp
Expand Down
7 changes: 2 additions & 5 deletions src/modules/word/Word.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,12 @@

#include <algorithm>
#include <array>
#include <cstdint>
#include <optional>
#include <string>
#include <string_view>
#include <vector>

#include "../../common/StringHelper.h"
#include "data/All.h"
#include "faker-cxx/Helper.h"
#include "WordData.h"

namespace faker::word
{
Expand Down Expand Up @@ -60,7 +57,7 @@ std::string words(unsigned numberOfWords)
std::string combined_words;
if (numberOfWords <= 256)
{
std::array<unsigned int, 256> tmp; // fitting 1024 bytes worth of integers*
std::array<unsigned int, 256> tmp{}; // fitting 1024 bytes worth of integers*
const size_t last_index = _allWords.size() - 1;
size_t reserve_size = 0;

Expand Down
Loading

0 comments on commit c21f98b

Please sign in to comment.