Some fixes for statements to string, added more tests
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2019-09-05 12:22:10 +02:00
parent fb142c7f25
commit 256969e912
3 changed files with 166 additions and 48 deletions

View File

@@ -4,6 +4,7 @@
#include <string>
#include <memory>
#include "StringUtils.hpp"
namespace Porygon::Utilities{
class HashedString{
@@ -51,6 +52,13 @@ namespace Porygon::Utilities{
return _string;
}
inline const std::string GetDebugString() const{
if (_string){
return Utilities::StringUtils::FromUTF8(*_string.get());
}
return std::to_string(_hash);
}
inline bool operator==(const HashedString& b) const{
return _hash == b._hash;
}