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.
Refactored Movies (cieslarmichal#583)
* Refactored actors and actresses Signed-off-by: Uilian Ries <[email protected]> * Add more movie data Signed-off-by: Uilian Ries <[email protected]> * Add movie data to cmake lists Signed-off-by: Uilian Ries <[email protected]> * Update movies test Signed-off-by: Uilian Ries <[email protected]> --------- Signed-off-by: Uilian Ries <[email protected]>
- Loading branch information
1 parent
9a59078
commit f4ec12b
Showing
12 changed files
with
1,347 additions
and
1,361 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,43 +1,38 @@ | ||
#include "faker-cxx/Movie.h" | ||
|
||
#include "data/Actors.h" | ||
#include "data/Actresses.h" | ||
#include "data/Directors.h" | ||
#include "data/Genres.h" | ||
#include "data/Movies.h" | ||
#include "data/TvShows.h" | ||
#include "MovieData.h" | ||
#include "faker-cxx/Helper.h" | ||
|
||
namespace faker | ||
{ | ||
std::string Movie::genre() | ||
std::string_view Movie::genre() | ||
{ | ||
return Helper::arrayElement<std::string>(genres); | ||
return Helper::arrayElement(genres); | ||
} | ||
|
||
std::string Movie::movieTitle() | ||
std::string_view Movie::movieTitle() | ||
{ | ||
return Helper::arrayElement<std::string>(movies); | ||
return Helper::arrayElement(movies); | ||
} | ||
|
||
std::string Movie::tvShow() | ||
std::string_view Movie::tvShow() | ||
{ | ||
return Helper::arrayElement<std::string>(tvShows); | ||
return Helper::arrayElement(tvShows); | ||
} | ||
|
||
std::string Movie::director() | ||
std::string_view Movie::director() | ||
{ | ||
return Helper::arrayElement<std::string>(directors); | ||
return Helper::arrayElement(directors); | ||
} | ||
|
||
std::string Movie::actor() | ||
std::string_view Movie::actor() | ||
{ | ||
return Helper::arrayElement<std::string>(actors); | ||
return Helper::arrayElement(actors); | ||
} | ||
|
||
std::string Movie::actress() | ||
std::string_view Movie::actress() | ||
{ | ||
return Helper::arrayElement<std::string>(actresses); | ||
return Helper::arrayElement(actresses); | ||
} | ||
|
||
} |
Oops, something went wrong.