Remove Ion::Charset

This commit is contained in:
Léa Saviot
2019-01-11 17:37:23 +01:00
committed by Émilie Feral
parent f576e31ff1
commit 65e5adafac
83 changed files with 453 additions and 470 deletions

View File

@@ -1,5 +1,6 @@
#include "helpers.h"
#include <string.h>
#include <kandinsky/unicode/code_point.h>
#include <ion.h>
namespace Code {
@@ -15,20 +16,16 @@ private:
const char * m_text;
};
static constexpr const char k_exponential[7] = {'e', 'x', 'p', '(', Ion::Charset::Empty, ')', 0};
static constexpr const char k_logarithm[7] = {'l', 'o', 'g', '(', Ion::Charset::Empty, ')', 0};
static constexpr const char k_logarithm10[9] = {'l', 'o', 'g', '1', '0', '(', Ion::Charset::Empty, ')', 0};
static constexpr const char k_sqrt[8] = {'s', 'q', 'r', 't', '(', Ion::Charset::Empty, ')', 0};
static_assert('\x11' == KDCodePointEmpty, "Unicode error");
static constexpr EventTextPair sEventTextMap[] = {
EventTextPair(Ion::Events::XNT, "x"),
EventTextPair(Ion::Events::Exp, k_exponential),
EventTextPair(Ion::Events::Ln, k_logarithm),
EventTextPair(Ion::Events::Log, k_logarithm10),
EventTextPair(Ion::Events::Exp, "exp(\x11)"),
EventTextPair(Ion::Events::Ln, "log(\x11)"),
EventTextPair(Ion::Events::Log, "log10(\x11)"),
EventTextPair(Ion::Events::Imaginary, "1j"),
EventTextPair(Ion::Events::Power, "**"),
EventTextPair(Ion::Events::Pi, "pi"),
EventTextPair(Ion::Events::Sqrt, k_sqrt),
EventTextPair(Ion::Events::Sqrt, "sqrt(\x11)"),
EventTextPair(Ion::Events::Square, "**2"),
EventTextPair(Ion::Events::Multiplication, "*"),
EventTextPair(Ion::Events::EE, "e"),