Some fixes for statements to string, added more tests
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user