mirror of
https://github.com/Microsoft/calculator.git
synced 2025-08-22 14:13:30 -07:00
feedback
This commit is contained in:
parent
ce347e6426
commit
1a5ad13680
2 changed files with 123 additions and 122 deletions
|
@ -29,8 +29,9 @@ unordered_map<wstring, wstring> CCalcEngine::s_engineStrings;
|
||||||
|
|
||||||
void CCalcEngine::LoadEngineStrings(CalculationManager::IResourceProvider& resourceProvider)
|
void CCalcEngine::LoadEngineStrings(CalculationManager::IResourceProvider& resourceProvider)
|
||||||
{
|
{
|
||||||
for (const auto& locKey : g_sids)
|
for (const auto& sid : g_sids)
|
||||||
{
|
{
|
||||||
|
auto locKey = wstring{ sid };
|
||||||
auto locString = resourceProvider.GetCEngineString(locKey);
|
auto locString = resourceProvider.GetCEngineString(locKey);
|
||||||
if (!locString.empty())
|
if (!locString.empty())
|
||||||
{
|
{
|
||||||
|
|
|
@ -166,126 +166,126 @@ inline constexpr auto SIDS_ERR_INPUT_OVERFLOW = L"119";
|
||||||
inline constexpr auto SIDS_ERR_OUTPUT_OVERFLOW = L"120";
|
inline constexpr auto SIDS_ERR_OUTPUT_OVERFLOW = L"120";
|
||||||
|
|
||||||
// Include the resource key ID from above into this vector to load it into memory for the engine to use
|
// Include the resource key ID from above into this vector to load it into memory for the engine to use
|
||||||
__declspec(selectany) std::vector<std::wstring> g_sids =
|
inline constexpr std::array<std::wstring_view, 120> g_sids =
|
||||||
{
|
{
|
||||||
std::wstring(SIDS_PLUS_MINUS),
|
SIDS_PLUS_MINUS,
|
||||||
std::wstring(SIDS_C),
|
SIDS_C,
|
||||||
std::wstring(SIDS_CE),
|
SIDS_CE,
|
||||||
std::wstring(SIDS_BACKSPACE),
|
SIDS_BACKSPACE,
|
||||||
std::wstring(SIDS_DECIMAL_SEPARATOR),
|
SIDS_DECIMAL_SEPARATOR,
|
||||||
std::wstring(SIDS_EMPTY_STRING),
|
SIDS_EMPTY_STRING,
|
||||||
std::wstring(SIDS_AND),
|
SIDS_AND,
|
||||||
std::wstring(SIDS_OR),
|
SIDS_OR,
|
||||||
std::wstring(SIDS_XOR),
|
SIDS_XOR,
|
||||||
std::wstring(SIDS_LSH),
|
SIDS_LSH,
|
||||||
std::wstring(SIDS_RSH),
|
SIDS_RSH,
|
||||||
std::wstring(SIDS_DIVIDE),
|
SIDS_DIVIDE,
|
||||||
std::wstring(SIDS_MULTIPLY),
|
SIDS_MULTIPLY,
|
||||||
std::wstring(SIDS_PLUS),
|
SIDS_PLUS,
|
||||||
std::wstring(SIDS_MINUS),
|
SIDS_MINUS,
|
||||||
std::wstring(SIDS_MOD),
|
SIDS_MOD,
|
||||||
std::wstring(SIDS_YROOT),
|
SIDS_YROOT,
|
||||||
std::wstring(SIDS_POW_HAT),
|
SIDS_POW_HAT,
|
||||||
std::wstring(SIDS_INT),
|
SIDS_INT,
|
||||||
std::wstring(SIDS_ROL),
|
SIDS_ROL,
|
||||||
std::wstring(SIDS_ROR),
|
SIDS_ROR,
|
||||||
std::wstring(SIDS_NOT),
|
SIDS_NOT,
|
||||||
std::wstring(SIDS_SIN),
|
SIDS_SIN,
|
||||||
std::wstring(SIDS_COS),
|
SIDS_COS,
|
||||||
std::wstring(SIDS_TAN),
|
SIDS_TAN,
|
||||||
std::wstring(SIDS_SINH),
|
SIDS_SINH,
|
||||||
std::wstring(SIDS_COSH),
|
SIDS_COSH,
|
||||||
std::wstring(SIDS_TANH),
|
SIDS_TANH,
|
||||||
std::wstring(SIDS_LN),
|
SIDS_LN,
|
||||||
std::wstring(SIDS_LOG),
|
SIDS_LOG,
|
||||||
std::wstring(SIDS_SQRT),
|
SIDS_SQRT,
|
||||||
std::wstring(SIDS_XPOW2),
|
SIDS_XPOW2,
|
||||||
std::wstring(SIDS_XPOW3),
|
SIDS_XPOW3,
|
||||||
std::wstring(SIDS_NFACTORIAL),
|
SIDS_NFACTORIAL,
|
||||||
std::wstring(SIDS_RECIPROCAL),
|
SIDS_RECIPROCAL,
|
||||||
std::wstring(SIDS_DMS),
|
SIDS_DMS,
|
||||||
std::wstring(SIDS_CUBEROOT),
|
SIDS_CUBEROOT,
|
||||||
std::wstring(SIDS_POWTEN),
|
SIDS_POWTEN,
|
||||||
std::wstring(SIDS_PERCENT),
|
SIDS_PERCENT,
|
||||||
std::wstring(SIDS_SCIENTIFIC_NOTATION),
|
SIDS_SCIENTIFIC_NOTATION,
|
||||||
std::wstring(SIDS_PI),
|
SIDS_PI,
|
||||||
std::wstring(SIDS_EQUAL),
|
SIDS_EQUAL,
|
||||||
std::wstring(SIDS_MC),
|
SIDS_MC,
|
||||||
std::wstring(SIDS_MR),
|
SIDS_MR,
|
||||||
std::wstring(SIDS_MS),
|
SIDS_MS,
|
||||||
std::wstring(SIDS_MPLUS),
|
SIDS_MPLUS,
|
||||||
std::wstring(SIDS_MMINUS),
|
SIDS_MMINUS,
|
||||||
std::wstring(SIDS_EXP),
|
SIDS_EXP,
|
||||||
std::wstring(SIDS_OPEN_PAREN),
|
SIDS_OPEN_PAREN,
|
||||||
std::wstring(SIDS_CLOSE_PAREN),
|
SIDS_CLOSE_PAREN,
|
||||||
std::wstring(SIDS_0),
|
SIDS_0,
|
||||||
std::wstring(SIDS_1),
|
SIDS_1,
|
||||||
std::wstring(SIDS_2),
|
SIDS_2,
|
||||||
std::wstring(SIDS_3),
|
SIDS_3,
|
||||||
std::wstring(SIDS_4),
|
SIDS_4,
|
||||||
std::wstring(SIDS_5),
|
SIDS_5,
|
||||||
std::wstring(SIDS_6),
|
SIDS_6,
|
||||||
std::wstring(SIDS_7),
|
SIDS_7,
|
||||||
std::wstring(SIDS_8),
|
SIDS_8,
|
||||||
std::wstring(SIDS_9),
|
SIDS_9,
|
||||||
std::wstring(SIDS_A),
|
SIDS_A,
|
||||||
std::wstring(SIDS_B),
|
SIDS_B,
|
||||||
std::wstring(SIDS_C),
|
SIDS_C,
|
||||||
std::wstring(SIDS_D),
|
SIDS_D,
|
||||||
std::wstring(SIDS_E),
|
SIDS_E,
|
||||||
std::wstring(SIDS_F),
|
SIDS_F,
|
||||||
std::wstring(SIDS_FRAC),
|
SIDS_FRAC,
|
||||||
std::wstring(SIDS_SIND),
|
SIDS_SIND,
|
||||||
std::wstring(SIDS_COSD),
|
SIDS_COSD,
|
||||||
std::wstring(SIDS_TAND),
|
SIDS_TAND,
|
||||||
std::wstring(SIDS_ASIND),
|
SIDS_ASIND,
|
||||||
std::wstring(SIDS_ACOSD),
|
SIDS_ACOSD,
|
||||||
std::wstring(SIDS_ATAND),
|
SIDS_ATAND,
|
||||||
std::wstring(SIDS_SINR),
|
SIDS_SINR,
|
||||||
std::wstring(SIDS_COSR),
|
SIDS_COSR,
|
||||||
std::wstring(SIDS_TANR),
|
SIDS_TANR,
|
||||||
std::wstring(SIDS_ASINR),
|
SIDS_ASINR,
|
||||||
std::wstring(SIDS_ACOSR),
|
SIDS_ACOSR,
|
||||||
std::wstring(SIDS_ATANR),
|
SIDS_ATANR,
|
||||||
std::wstring(SIDS_SING),
|
SIDS_SING,
|
||||||
std::wstring(SIDS_COSG),
|
SIDS_COSG,
|
||||||
std::wstring(SIDS_TANG),
|
SIDS_TANG,
|
||||||
std::wstring(SIDS_ASING),
|
SIDS_ASING,
|
||||||
std::wstring(SIDS_ACOSG),
|
SIDS_ACOSG,
|
||||||
std::wstring(SIDS_ATANG),
|
SIDS_ATANG,
|
||||||
std::wstring(SIDS_ASINH),
|
SIDS_ASINH,
|
||||||
std::wstring(SIDS_ACOSH),
|
SIDS_ACOSH,
|
||||||
std::wstring(SIDS_ATANH),
|
SIDS_ATANH,
|
||||||
std::wstring(SIDS_POWE),
|
SIDS_POWE,
|
||||||
std::wstring(SIDS_POWTEN2),
|
SIDS_POWTEN2,
|
||||||
std::wstring(SIDS_SQRT2),
|
SIDS_SQRT2,
|
||||||
std::wstring(SIDS_SQR),
|
SIDS_SQR,
|
||||||
std::wstring(SIDS_CUBE),
|
SIDS_CUBE,
|
||||||
std::wstring(SIDS_CUBERT),
|
SIDS_CUBERT,
|
||||||
std::wstring(SIDS_FACT),
|
SIDS_FACT,
|
||||||
std::wstring(SIDS_RECIPROC),
|
SIDS_RECIPROC,
|
||||||
std::wstring(SIDS_DEGREES),
|
SIDS_DEGREES,
|
||||||
std::wstring(SIDS_NEGATE),
|
SIDS_NEGATE,
|
||||||
std::wstring(SIDS_RSH),
|
SIDS_RSH,
|
||||||
std::wstring(SIDS_DIVIDEBYZERO),
|
SIDS_DIVIDEBYZERO,
|
||||||
std::wstring(SIDS_DOMAIN),
|
SIDS_DOMAIN,
|
||||||
std::wstring(SIDS_UNDEFINED),
|
SIDS_UNDEFINED,
|
||||||
std::wstring(SIDS_POS_INFINITY),
|
SIDS_POS_INFINITY,
|
||||||
std::wstring(SIDS_NEG_INFINITY),
|
SIDS_NEG_INFINITY,
|
||||||
std::wstring(SIDS_ABORTED),
|
SIDS_ABORTED,
|
||||||
std::wstring(SIDS_NOMEM),
|
SIDS_NOMEM,
|
||||||
std::wstring(SIDS_TOOMANY),
|
SIDS_TOOMANY,
|
||||||
std::wstring(SIDS_OVERFLOW),
|
SIDS_OVERFLOW,
|
||||||
std::wstring(SIDS_NORESULT),
|
SIDS_NORESULT,
|
||||||
std::wstring(SIDS_INSUFFICIENT_DATA),
|
SIDS_INSUFFICIENT_DATA,
|
||||||
std::wstring(SIDS_ERR_UNK_CH),
|
SIDS_ERR_UNK_CH,
|
||||||
std::wstring(SIDS_ERR_UNK_FN),
|
SIDS_ERR_UNK_FN,
|
||||||
std::wstring(SIDS_ERR_UNEX_NUM),
|
SIDS_ERR_UNEX_NUM,
|
||||||
std::wstring(SIDS_ERR_UNEX_CH),
|
SIDS_ERR_UNEX_CH,
|
||||||
std::wstring(SIDS_ERR_UNEX_SZ),
|
SIDS_ERR_UNEX_SZ,
|
||||||
std::wstring(SIDS_ERR_MISMATCH_CLOSE),
|
SIDS_ERR_MISMATCH_CLOSE,
|
||||||
std::wstring(SIDS_ERR_UNEX_END),
|
SIDS_ERR_UNEX_END,
|
||||||
std::wstring(SIDS_ERR_SG_INV_ERROR),
|
SIDS_ERR_SG_INV_ERROR,
|
||||||
std::wstring(SIDS_ERR_INPUT_OVERFLOW),
|
SIDS_ERR_INPUT_OVERFLOW,
|
||||||
std::wstring(SIDS_ERR_OUTPUT_OVERFLOW)
|
SIDS_ERR_OUTPUT_OVERFLOW
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue