forked from cieslarmichal/faker-cxx
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor Video Game (cieslarmichal#586)
* Add VideoGameData draft Signed-off-by: Uilian Ries <[email protected]> * Add rest of data to VideoGame Signed-off-by: Uilian Ries <[email protected]> * Fix helper usage for video game Signed-off-by: Uilian Ries <[email protected]> * avoid circular include Signed-off-by: Uilian Ries <[email protected]> * build missing videogame data Signed-off-by: Uilian Ries <[email protected]> * Add namespace for videogame Signed-off-by: Uilian Ries <[email protected]> * Use video game namespace for testing Signed-off-by: Uilian Ries <[email protected]> * fix genres conflict Signed-off-by: Uilian Ries <[email protected]> * Use explicit namespace Signed-off-by: Uilian Ries <[email protected]> * use separated name for video game genres Signed-off-by: Uilian Ries <[email protected]> * Revert "fix genres conflict" This reverts commit bac4da6. --------- Signed-off-by: Uilian Ries <[email protected]>
- Loading branch information
1 parent
e16a66d
commit 37cf2d5
Showing
9 changed files
with
3,000 additions
and
3,000 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,28 @@ | ||
#include "faker-cxx/VideoGame.h" | ||
|
||
#include "data/GameTitles.h" | ||
#include "data/Genres.h" | ||
#include "data/Platforms.h" | ||
#include "data/StudioNames.h" | ||
#include "VideoGameData.h" | ||
#include "faker-cxx/Helper.h" | ||
|
||
|
||
namespace faker | ||
{ | ||
std::string VideoGame::gameTitle() | ||
std::string_view VideoGame::gameTitle() | ||
{ | ||
return Helper::arrayElement<std::string>(videoGameNames); | ||
return Helper::arrayElement(videoGame::videoGameNames); | ||
} | ||
|
||
std::string VideoGame::genre() | ||
std::string_view VideoGame::genre() | ||
{ | ||
return Helper::arrayElement<std::string>(videoGameGenres); | ||
return Helper::arrayElement(videoGame::videoGameGenres); | ||
} | ||
|
||
std::string VideoGame::platform() | ||
std::string_view VideoGame::platform() | ||
{ | ||
return Helper::arrayElement<std::string>(platforms); | ||
return Helper::arrayElement(videoGame::platforms); | ||
} | ||
|
||
std::string VideoGame::studioName() | ||
std::string_view VideoGame::studioName() | ||
{ | ||
return Helper::arrayElement<std::string>(studioNames); | ||
return Helper::arrayElement(videoGame::studioNames); | ||
} | ||
} |
Oops, something went wrong.