Refactors constants out of Genders.h.
This commit is contained in:
@@ -7,6 +7,21 @@ namespace SBF {
|
||||
using std::string;
|
||||
using std::vector;
|
||||
|
||||
const int kGendersCount = 5;
|
||||
const std::string kGenderMaleLabel = "Male";
|
||||
const std::string kGenderFemaleLabel = "Female";
|
||||
const std::string kGenderTransMaleLabel = "Trans-Male";
|
||||
const std::string kGenderTransFemaleLabel = "Trans-Female";
|
||||
const std::string kGenderNonBinaryLabel = "Non-Binary";
|
||||
const std::string kGenderLabels[] = {
|
||||
"",
|
||||
kGenderMaleLabel,
|
||||
kGenderFemaleLabel,
|
||||
kGenderTransMaleLabel,
|
||||
kGenderTransFemaleLabel,
|
||||
kGenderNonBinaryLabel,
|
||||
};
|
||||
|
||||
string GetGenderLabel(int genderId) {
|
||||
if (genderId > 0 && genderId <= kGendersCount) {
|
||||
return kGenderLabels[genderId];
|
||||
|
||||
Reference in New Issue
Block a user