Skip to content

Commit e002e24

Browse files
authored
Add "USD" currency
1 parent 36622e6 commit e002e24

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

include/netlicensing/datatypes.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,21 +117,24 @@ namespace netlicensing {
117117

118118
enum class Currency {
119119
NONE,
120-
EUR
120+
EUR,
121+
USD
121122
};
122123
inline const char* currencyToString(Currency v)
123124
{
124125
switch (v)
125126
{
126127
case Currency::NONE: return "";
127128
case Currency::EUR: return "EUR";
129+
case Currency::USD: return "USD";
128130
default: return "[Unknown Currency]";
129131
}
130132
}
131133
inline const Currency stringToCurrency(const String_t& v)
132134
{
133135
if (std::string(v) == "") return Currency::NONE;
134136
else if (std::string(v) == "EUR") return Currency::EUR;
137+
else if (std::string(v) == "USD") return Currency::USD;
135138
else return Currency::NONE;
136139
}
137140

0 commit comments

Comments
 (0)