[poincare] Clearer CodePointLayout log

This commit is contained in:
Léa Saviot
2019-01-29 10:36:11 +01:00
committed by Émilie Feral
parent 5df9e0af71
commit 2e65bd3e51

View File

@@ -4,6 +4,7 @@
#include <ion/unicode/code_point.h>
#include <poincare/layout_cursor.h>
#include <poincare/layout.h>
#include <poincare/serialization_helper.h>
namespace Poincare {
@@ -40,7 +41,10 @@ public:
stream << "CodePointLayout";
}
virtual void logAttributes(std::ostream & stream) const override {
stream << " CodePoint=\"" << m_codePoint << "\"";
constexpr int bufferSize = CodePoint::MaxCodePointCharLength + 1;
char buffer[bufferSize];
SerializationHelper::CodePoint(buffer, bufferSize, m_codePoint);
stream << " CodePoint=\"" << buffer << "\"";
}
#endif