2323#include " Analytics.hpp"
2424
2525#include " src/core/compiler/common/StackElement.hpp"
26- #include " src/core/compiler/common/StackType.hpp"
2726
2827namespace vb {
2928namespace extension {
@@ -48,8 +47,13 @@ void Analytics::updateMemoryUsage(MemoryUsage &memoryUsage, uint32_t const compi
4847// / @param maxBlocks Max number of blocks
4948// / @param end String to print after the line
5049void printGraphLine (float const percent, uint32_t const maxBlocks, std::string const &end = " \n " ) {
51- constexpr char fullBlock[4 ] = " █" ; // NOLINT(modernize-avoid-c-arrays)
52- constexpr std::array<char [4 ], 8 > blockChars = {" " , " ▏" , " ▎" , " ▍" , " ▌" , " ▋" , " ▊" , " ▉" }; // NOLINT(modernize-avoid-c-arrays)
50+ // Use explicit UTF-8 byte escape sequences so source remains pure ASCII and works on MSVC/GCC/Clang without /utf-8.
51+ // Unicode: FULL BLOCK U+2588, LEFT 1/8..7/8 BLOCK U+258F..U+2589
52+ // █
53+ constexpr const char *fullBlock = " \xE2\x96\x88 " ;
54+ // "", "▏", "▎", "▍", "▌", "▋", "▊", "▉"
55+ constexpr std::array<const char *, 8 > blockChars{
56+ " " , " \xE2\x96\x8F " , " \xE2\x96\x8E " , " \xE2\x96\x8D " , " \xE2\x96\x8C " , " \xE2\x96\x8B " , " \xE2\x96\x8A " , " \xE2\x96\x89 " };
5357
5458 uint32_t const fullBlocks = static_cast <uint32_t >(percent * static_cast <float >(maxBlocks));
5559 uint32_t const eightsBlocks = static_cast <uint32_t >((percent * static_cast <float >(maxBlocks) - static_cast <float >(fullBlocks)) / 0 .125F );
0 commit comments