-
-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* change music to use string view Signed-off-by: Uilian Ries <uilianries@gmail.com> * Add artists to music data Signed-off-by: Uilian Ries <uilianries@gmail.com> * Update Music tests to use string view Signed-off-by: Uilian Ries <uilianries@gmail.com> --------- Signed-off-by: Uilian Ries <uilianries@gmail.com>
- Loading branch information
1 parent
e550bc6
commit 901ee78
Showing
9 changed files
with
1,326 additions
and
1,316 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,24 +1,22 @@ | ||
#include "faker-cxx/Music.h" | ||
|
||
#include "data/Artists.h" | ||
#include "data/Genres.h" | ||
#include "data/SongNames.h" | ||
#include "MusicData.h" | ||
#include "faker-cxx/Helper.h" | ||
|
||
namespace faker | ||
{ | ||
std::string Music::artist() | ||
std::string_view Music::artist() | ||
{ | ||
return Helper::arrayElement<std::string>(artists); | ||
return Helper::arrayElement(music::artists); | ||
} | ||
|
||
std::string Music::genre() | ||
std::string_view Music::genre() | ||
{ | ||
return Helper::arrayElement<std::string>(musicGenres); | ||
return Helper::arrayElement(music::musicGenres); | ||
} | ||
|
||
std::string Music::songName() | ||
std::string_view Music::songName() | ||
{ | ||
return Helper::arrayElement<std::string>(songNames); | ||
return Helper::arrayElement(music::songNames); | ||
} | ||
} |
Oops, something went wrong.