Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: refactor word data into single file #700

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading