mirror of
https://github.com/daveallie/crosspoint-reader.git
synced 2026-02-07 08:07:40 +03:00
format fix
This commit is contained in:
parent
5d00e5ac0f
commit
247463a4b9
@ -1,7 +1,6 @@
|
|||||||
#include "ParsedText.h"
|
#include "ParsedText.h"
|
||||||
|
|
||||||
#include <GfxRenderer.h>
|
#include <GfxRenderer.h>
|
||||||
#include "hyphenation/Hyphenator.h"
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
@ -10,6 +9,8 @@
|
|||||||
#include <limits>
|
#include <limits>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include "hyphenation/Hyphenator.h"
|
||||||
|
|
||||||
constexpr int MAX_COST = std::numeric_limits<int>::max();
|
constexpr int MAX_COST = std::numeric_limits<int>::max();
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|||||||
@ -93,18 +93,15 @@ bool englishSegmentHasVowel(const std::vector<CodepointInfo>& cps, const size_t
|
|||||||
|
|
||||||
void appendMorphologyBreaks(const std::vector<CodepointInfo>& cps, const std::string& lowerWord,
|
void appendMorphologyBreaks(const std::vector<CodepointInfo>& cps, const std::string& lowerWord,
|
||||||
std::vector<size_t>& indexes) {
|
std::vector<size_t>& indexes) {
|
||||||
static constexpr std::array<LatinLiteral, 20> PREFIXES = {{{"anti", 4}, {"auto", 4}, {"counter", 7}, {"de", 2},
|
static constexpr std::array<LatinLiteral, 20> PREFIXES = {
|
||||||
{"dis", 3}, {"hyper", 5}, {"inter", 5}, {"micro", 5},
|
{{"anti", 4}, {"auto", 4}, {"counter", 7}, {"de", 2}, {"dis", 3}, {"hyper", 5}, {"inter", 5},
|
||||||
{"mis", 3}, {"mono", 4}, {"multi", 5}, {"non", 3},
|
{"micro", 5}, {"mis", 3}, {"mono", 4}, {"multi", 5}, {"non", 3}, {"over", 4}, {"post", 4},
|
||||||
{"over", 4}, {"post", 4}, {"pre", 3}, {"pro", 3},
|
{"pre", 3}, {"pro", 3}, {"re", 2}, {"sub", 3}, {"super", 5}, {"trans", 5}}};
|
||||||
{"re", 2}, {"sub", 3}, {"super", 5}, {"trans", 5}}};
|
|
||||||
|
|
||||||
static constexpr std::array<LatinLiteral, 24> SUFFIXES = {{{"able", 4}, {"ible", 4}, {"ing", 3}, {"ings", 4},
|
static constexpr std::array<LatinLiteral, 24> SUFFIXES = {
|
||||||
{"ed", 2}, {"er", 2}, {"ers", 3}, {"est", 3},
|
{{"able", 4}, {"ible", 4}, {"ing", 3}, {"ings", 4}, {"ed", 2}, {"er", 2}, {"ers", 3}, {"est", 3},
|
||||||
{"ful", 3}, {"hood", 4}, {"less", 4}, {"lessly", 6},
|
{"ful", 3}, {"hood", 4}, {"less", 4}, {"lessly", 6}, {"ly", 2}, {"ment", 4}, {"ments", 5}, {"ness", 4},
|
||||||
{"ly", 2}, {"ment", 4}, {"ments", 5}, {"ness", 4},
|
{"ous", 3}, {"tion", 4}, {"sion", 4}, {"ward", 4}, {"wards", 5}, {"ship", 4}, {"ships", 5}, {"y", 1}}};
|
||||||
{"ous", 3}, {"tion", 4}, {"sion", 4}, {"ward", 4},
|
|
||||||
{"wards", 5}, {"ship", 4}, {"ships", 5}, {"y", 1}}};
|
|
||||||
|
|
||||||
const size_t length = cps.size();
|
const size_t length = cps.size();
|
||||||
if (length < MIN_PREFIX_CP + MIN_SUFFIX_CP) {
|
if (length < MIN_PREFIX_CP + MIN_SUFFIX_CP) {
|
||||||
|
|||||||
@ -16,8 +16,7 @@ const SettingInfo settingsList[settingsCount] = {
|
|||||||
{"Extra Paragraph Spacing", SettingType::TOGGLE, &CrossPointSettings::extraParagraphSpacing, {}},
|
{"Extra Paragraph Spacing", SettingType::TOGGLE, &CrossPointSettings::extraParagraphSpacing, {}},
|
||||||
{"Short Power Button Click", SettingType::TOGGLE, &CrossPointSettings::shortPwrBtn, {}},
|
{"Short Power Button Click", SettingType::TOGGLE, &CrossPointSettings::shortPwrBtn, {}},
|
||||||
{"Check for updates", SettingType::ACTION, nullptr, {}},
|
{"Check for updates", SettingType::ACTION, nullptr, {}},
|
||||||
{"Hyphenation", SettingType::TOGGLE, &CrossPointSettings::hyphenationEnabled, {}}
|
{"Hyphenation", SettingType::TOGGLE, &CrossPointSettings::hyphenationEnabled, {}}};
|
||||||
};
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
void SettingsActivity::taskTrampoline(void* param) {
|
void SettingsActivity::taskTrampoline(void* param) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user