diff options
Diffstat (limited to 'src/openvic/Types.cpp')
-rw-r--r-- | src/openvic/Types.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/openvic/Types.cpp b/src/openvic/Types.cpp index ab5d12a..9ea9c47 100644 --- a/src/openvic/Types.cpp +++ b/src/openvic/Types.cpp @@ -6,26 +6,27 @@ using namespace OpenVic; -HasIdentifier::HasIdentifier(std::string const& new_identifier) : identifier { new_identifier } { +HasIdentifier::HasIdentifier(ovstring const& new_identifier) : identifier { new_identifier } { assert(!identifier.empty()); } -std::string const& HasIdentifier::get_identifier() const { +ovstring const& HasIdentifier::get_identifier() const { return identifier; } HasColour::HasColour(colour_t const new_colour, bool can_be_null) : colour(new_colour) { - assert((can_be_null || colour != NULL_COLOUR) && colour <= MAX_COLOUR_RGB); + // assert(colour <= MAX_COLOUR_RGB); + assert((can_be_null || colour != NULL_COLOUR)); } colour_t HasColour::get_colour() const { return colour; } -std::string HasColour::colour_to_hex_string(colour_t const colour) { - std::ostringstream stream; - stream << std::hex << std::setfill('0') << std::setw(6) << colour; +ovstring HasColour::colour_to_hex_string(colour_t const colour) { + std::wostringstream stream; + stream << std::hex << std::setfill(L'0') << std::setw(6) << colour; return stream.str(); } -std::string HasColour::colour_to_hex_string() const { +ovstring HasColour::colour_to_hex_string() const { return colour_to_hex_string(colour); } |