refactor: Replace cached hyphenator function with static member variable

This commit is contained in:
Arthur Tazhitdinov
2026-01-14 18:11:19 +05:00
parent 85a737fd82
commit 268d215cbb
2 changed files with 11 additions and 8 deletions

View File

@@ -4,6 +4,8 @@
#include <string>
#include <vector>
class LanguageHyphenator;
class Hyphenator {
public:
struct BreakInfo {
@@ -16,4 +18,7 @@ class Hyphenator {
// Provide a publication-level language hint (e.g. "en", "en-US", "ru") used to select hyphenation rules.
static void setPreferredLanguage(const std::string& lang);
private:
static const LanguageHyphenator* cachedHyphenator_;
};