diff --git a/src/libime/core/datrie.h b/src/libime/core/datrie.h index 2356a2d..5c29205 100644 --- a/src/libime/core/datrie.h +++ b/src/libime/core/datrie.h @@ -24,9 +24,6 @@ namespace libime { template class DATriePrivate; -template -class DATrie; - template struct NaN { static constexpr auto N1 = -1; diff --git a/src/libime/core/decoder.cpp b/src/libime/core/decoder.cpp index 3551158..1f07165 100644 --- a/src/libime/core/decoder.cpp +++ b/src/libime/core/decoder.cpp @@ -5,14 +5,12 @@ */ #include "decoder.h" -#include "datrie.h" #include "languagemodel.h" #include "lattice_p.h" #include "utils.h" #include #include #include -#include #include #include #include diff --git a/src/libime/core/decoder.h b/src/libime/core/decoder.h index ba894a0..1cfd8f5 100644 --- a/src/libime/core/decoder.h +++ b/src/libime/core/decoder.h @@ -7,19 +7,16 @@ #define _FCITX_LIBIME_CORE_DECODER_H_ #include "libimecore_export.h" -#include #include #include #include #include #include -#include namespace libime { class DecoderPrivate; class Dictionary; -class LanguageModel; class LIBIMECORE_EXPORT Decoder { friend class DecoderPrivate; diff --git a/src/libime/core/historybigram.cpp b/src/libime/core/historybigram.cpp index d53ee02..97dba26 100644 --- a/src/libime/core/historybigram.cpp +++ b/src/libime/core/historybigram.cpp @@ -10,12 +10,10 @@ #include "zstdfilter.h" #include #include -#include #include #include #include #include -#include #include #include #include diff --git a/src/libime/core/historybigram.h b/src/libime/core/historybigram.h index 2dfd7e9..f2abab4 100644 --- a/src/libime/core/historybigram.h +++ b/src/libime/core/historybigram.h @@ -17,7 +17,6 @@ namespace libime { class HistoryBigramPrivate; -class HistoryBigram; class LIBIMECORE_EXPORT HistoryBigram { public: diff --git a/src/libime/core/inputbuffer.cpp b/src/libime/core/inputbuffer.cpp index 362b46c..5abb0c9 100644 --- a/src/libime/core/inputbuffer.cpp +++ b/src/libime/core/inputbuffer.cpp @@ -4,12 +4,7 @@ * SPDX-License-Identifier: LGPL-2.1-or-later */ #include "inputbuffer.h" -#include -#include -#include #include -#include -#include namespace libime { diff --git a/src/libime/core/inputbuffer.h b/src/libime/core/inputbuffer.h index 2ecb6eb..57516f3 100644 --- a/src/libime/core/inputbuffer.h +++ b/src/libime/core/inputbuffer.h @@ -9,8 +9,6 @@ #include "libimecore_export.h" #include #include -#include -#include #include namespace libime { diff --git a/src/libime/core/lattice.h b/src/libime/core/lattice.h index 8c94ee4..a2fba04 100644 --- a/src/libime/core/lattice.h +++ b/src/libime/core/lattice.h @@ -9,7 +9,6 @@ #include "libimecore_export.h" #include #include -#include #include #include #include @@ -19,10 +18,7 @@ namespace libime { -class Decoder; class LatticePrivate; -class SegmentGraphNode; -class SegmentGraph; class LatticeNode; class SentenceResult { diff --git a/src/libime/core/segmentgraph.cpp b/src/libime/core/segmentgraph.cpp index 51b0079..41cd490 100644 --- a/src/libime/core/segmentgraph.cpp +++ b/src/libime/core/segmentgraph.cpp @@ -6,9 +6,7 @@ #include "segmentgraph.h" #include "lattice_p.h" -#include #include -#include #include namespace libime { diff --git a/src/libime/core/segmentgraph.h b/src/libime/core/segmentgraph.h index ccb1185..23c9a51 100644 --- a/src/libime/core/segmentgraph.h +++ b/src/libime/core/segmentgraph.h @@ -8,21 +8,16 @@ #include "libimecore_export.h" #include -#include #include -#include #include #include #include #include -#include #include namespace libime { -class Lattice; class SegmentGraphBase; -class SegmentGraph; class SegmentGraphNode; typedef std::function &)> diff --git a/src/libime/core/triedictionary.cpp b/src/libime/core/triedictionary.cpp index eaad4ea..d235abf 100644 --- a/src/libime/core/triedictionary.cpp +++ b/src/libime/core/triedictionary.cpp @@ -7,18 +7,8 @@ #include "triedictionary.h" #include "libime/core/datrie.h" -#include "libime/core/lattice.h" -#include "libime/core/lrucache.h" -#include "libime/core/utils.h" -#include #include -#include -#include -#include -#include -#include #include -#include namespace libime { diff --git a/src/libime/core/userlanguagemodel.cpp b/src/libime/core/userlanguagemodel.cpp index bfb228b..c60a18f 100644 --- a/src/libime/core/userlanguagemodel.cpp +++ b/src/libime/core/userlanguagemodel.cpp @@ -8,7 +8,6 @@ #include "constants.h" #include "historybigram.h" #include "lm/model.hh" -#include "utils.h" #include "utils_p.h" #include diff --git a/src/libime/core/userlanguagemodel.h b/src/libime/core/userlanguagemodel.h index 9958d3a..b9592a7 100644 --- a/src/libime/core/userlanguagemodel.h +++ b/src/libime/core/userlanguagemodel.h @@ -7,7 +7,6 @@ #define _FCITX_LIBIME_CORE_USERLANGUAGEMODEL_H_ #include "libimecore_export.h" -#include #include namespace libime { diff --git a/src/libime/pinyin/pinyincontext.cpp b/src/libime/pinyin/pinyincontext.cpp index fe00cb9..3c25c6e 100644 --- a/src/libime/pinyin/pinyincontext.cpp +++ b/src/libime/pinyin/pinyincontext.cpp @@ -13,7 +13,6 @@ #include "pinyinmatchstate.h" #include #include -#include #include #include #include diff --git a/src/libime/pinyin/pinyincontext.h b/src/libime/pinyin/pinyincontext.h index a534d25..aae6e85 100644 --- a/src/libime/pinyin/pinyincontext.h +++ b/src/libime/pinyin/pinyincontext.h @@ -18,7 +18,6 @@ namespace libime { class PinyinIME; class PinyinContextPrivate; -class LatticeNode; enum class PinyinPreeditMode; class LIBIMEPINYIN_EXPORT PinyinContext : public InputBuffer { diff --git a/src/libime/pinyin/pinyindata.cpp b/src/libime/pinyin/pinyindata.cpp index 057fa93..5b90ad0 100644 --- a/src/libime/pinyin/pinyindata.cpp +++ b/src/libime/pinyin/pinyindata.cpp @@ -8,6 +8,9 @@ #include "pinyinencoder.h" #include #include +#include +#include +#include namespace libime { diff --git a/src/libime/pinyin/pinyindictionary.cpp b/src/libime/pinyin/pinyindictionary.cpp index a0e08e3..93de9bd 100644 --- a/src/libime/pinyin/pinyindictionary.cpp +++ b/src/libime/pinyin/pinyindictionary.cpp @@ -15,9 +15,6 @@ #include "pinyinencoder.h" #include "pinyinmatchstate_p.h" #include -#include -#include -#include #include #include #include diff --git a/src/libime/pinyin/pinyindictionary.h b/src/libime/pinyin/pinyindictionary.h index 158c516..703eea6 100644 --- a/src/libime/pinyin/pinyindictionary.h +++ b/src/libime/pinyin/pinyindictionary.h @@ -7,7 +7,6 @@ #define _FCITX_LIBIME_PINYIN_PINYINDICTIONARY_H_ #include "libimepinyin_export.h" -#include #include #include #include @@ -22,7 +21,6 @@ class PinyinDictionaryPrivate; typedef std::function PinyinMatchCallback; -class PinyinDictionary; using PinyinTrie = typename TrieDictionary::TrieType; diff --git a/src/libime/pinyin/pinyinencoder.cpp b/src/libime/pinyin/pinyinencoder.cpp index aa60640..fc8b05e 100644 --- a/src/libime/pinyin/pinyinencoder.cpp +++ b/src/libime/pinyin/pinyinencoder.cpp @@ -10,7 +10,6 @@ #include #include #include -#include #include #include #include diff --git a/src/libime/pinyin/shuangpinprofile.cpp b/src/libime/pinyin/shuangpinprofile.cpp index b54ebb8..a3ee00e 100644 --- a/src/libime/pinyin/shuangpinprofile.cpp +++ b/src/libime/pinyin/shuangpinprofile.cpp @@ -8,9 +8,7 @@ #include "pinyinencoder.h" #include "shuangpindata.h" #include -#include #include -#include #include #include #include diff --git a/src/libime/pinyin/shuangpinprofile.h b/src/libime/pinyin/shuangpinprofile.h index 95e9e34..922bd0a 100644 --- a/src/libime/pinyin/shuangpinprofile.h +++ b/src/libime/pinyin/shuangpinprofile.h @@ -14,7 +14,6 @@ #include #include #include -#include namespace libime { diff --git a/src/libime/table/autophrasedict.h b/src/libime/table/autophrasedict.h index 1af0fcd..8c8a63d 100644 --- a/src/libime/table/autophrasedict.h +++ b/src/libime/table/autophrasedict.h @@ -12,7 +12,6 @@ #include #include #include -#include #include #include diff --git a/src/libime/table/tablebaseddictionary.cpp b/src/libime/table/tablebaseddictionary.cpp index c8a679a..4cfbf5c 100644 --- a/src/libime/table/tablebaseddictionary.cpp +++ b/src/libime/table/tablebaseddictionary.cpp @@ -16,18 +16,14 @@ #include "tableoptions.h" #include "tablerule.h" #include -#include -#include #include #include -#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/libime/table/tablecontext.cpp b/src/libime/table/tablecontext.cpp index 86a1f53..2b7c18a 100644 --- a/src/libime/table/tablecontext.cpp +++ b/src/libime/table/tablecontext.cpp @@ -5,7 +5,6 @@ */ #include "tablecontext.h" #include "constants.h" -#include "libime/core/decoder.h" #include "libime/core/historybigram.h" #include "libime/core/segmentgraph.h" #include "libime/core/userlanguagemodel.h" @@ -15,10 +14,7 @@ #include "tabledecoder.h" #include "tableoptions.h" #include "tablerule.h" -#include -#include #include -#include #include #include diff --git a/src/libime/table/tablecontext.h b/src/libime/table/tablecontext.h index d182231..12dc5ba 100644 --- a/src/libime/table/tablecontext.h +++ b/src/libime/table/tablecontext.h @@ -10,10 +10,8 @@ /// \brief Class provide input method support for table-based ones, like wubi. #include "libimetable_export.h" -#include #include #include -#include #include #include #include diff --git a/src/libime/table/tabledecoder.cpp b/src/libime/table/tabledecoder.cpp index dd5b468..bf474ec 100644 --- a/src/libime/table/tabledecoder.cpp +++ b/src/libime/table/tabledecoder.cpp @@ -8,7 +8,6 @@ #include "tableoptions.h" #include "tablerule.h" #include -#include #include namespace libime { diff --git a/src/libime/table/tablerule.h b/src/libime/table/tablerule.h index 72dbd77..59aede5 100644 --- a/src/libime/table/tablerule.h +++ b/src/libime/table/tablerule.h @@ -14,11 +14,7 @@ #include #include #include -#include -#include -#include #include -#include #include namespace libime { diff --git a/test/testmodel.cpp b/test/testmodel.cpp index b20b3bc..d16e355 100644 --- a/test/testmodel.cpp +++ b/test/testmodel.cpp @@ -8,7 +8,6 @@ #include "libime/core/lattice.h" #include "testdir.h" #include -#include int main() { using namespace libime; diff --git a/test/testpinyincontext.cpp b/test/testpinyincontext.cpp index 3485474..bf07617 100644 --- a/test/testpinyincontext.cpp +++ b/test/testpinyincontext.cpp @@ -13,9 +13,7 @@ #include "libime/pinyin/pinyinime.h" #include "testdir.h" #include -#include #include -#include #include using namespace libime; diff --git a/test/testpinyindictionary.cpp b/test/testpinyindictionary.cpp index a1c8854..216d7dd 100644 --- a/test/testpinyindictionary.cpp +++ b/test/testpinyindictionary.cpp @@ -7,7 +7,6 @@ #include "libime/pinyin/pinyindictionary.h" #include "libime/pinyin/pinyinencoder.h" #include "testdir.h" -#include "testutils.h" #include #include diff --git a/test/testpinyinime.cpp b/test/testpinyinime.cpp index 26e877f..3130658 100644 --- a/test/testpinyinime.cpp +++ b/test/testpinyinime.cpp @@ -15,15 +15,11 @@ #include "libime/pinyin/shuangpinprofile.h" #include "testdir.h" #include "testutils.h" -#include #include #include -#include #include -#include #include #include -#include using namespace libime; diff --git a/test/testpinyinprediction.cpp b/test/testpinyinprediction.cpp index 1c42566..429b243 100644 --- a/test/testpinyinprediction.cpp +++ b/test/testpinyinprediction.cpp @@ -9,9 +9,7 @@ #include "libime/pinyin/pinyinencoder.h" #include "libime/pinyin/pinyinprediction.h" #include "testdir.h" -#include "testutils.h" #include -#include using namespace libime; diff --git a/test/testprediction.cpp b/test/testprediction.cpp index 1bf4c32..561e3c7 100644 --- a/test/testprediction.cpp +++ b/test/testprediction.cpp @@ -5,18 +5,9 @@ */ #include "libime/core/historybigram.h" -#include "libime/core/languagemodel.h" #include "libime/core/prediction.h" #include "testdir.h" -#include "testutils.h" -#include -#include -#include -#include #include -#include -#include -#include using namespace libime; diff --git a/test/testtableime_unit.cpp b/test/testtableime_unit.cpp index d797d51..5ebf39e 100644 --- a/test/testtableime_unit.cpp +++ b/test/testtableime_unit.cpp @@ -7,10 +7,8 @@ #include "libime/core/userlanguagemodel.h" #include "libime/table/tablebaseddictionary.h" #include "libime/table/tablecontext.h" -#include "libime/table/tabledecoder.h" #include "libime/table/tableoptions.h" #include "testdir.h" -#include "testutils.h" #include using namespace libime; diff --git a/test/testtrie.cpp b/test/testtrie.cpp index f76e58f..b811850 100644 --- a/test/testtrie.cpp +++ b/test/testtrie.cpp @@ -4,7 +4,6 @@ * SPDX-License-Identifier: LGPL-2.1-or-later */ #include "libime/core/datrie.h" -#include #include #include diff --git a/test/testusermodel.cpp b/test/testusermodel.cpp index e128eae..3bdeae2 100644 --- a/test/testusermodel.cpp +++ b/test/testusermodel.cpp @@ -9,7 +9,6 @@ #include "libime/core/userlanguagemodel.h" #include "testdir.h" #include -#include #include #include diff --git a/test/triebench.cpp b/test/triebench.cpp index aef8f75..29ed1b6 100644 --- a/test/triebench.cpp +++ b/test/triebench.cpp @@ -5,8 +5,6 @@ */ #include "libime/core/datrie.h" #include -#include -#include #include #include #include diff --git a/tools/libime_history.cpp b/tools/libime_history.cpp index 6f4c5a3..279ba0d 100644 --- a/tools/libime_history.cpp +++ b/tools/libime_history.cpp @@ -7,7 +7,7 @@ #include "libime/core/historybigram.h" #include #include -#include +#include #include void usage(const char *argv0) { diff --git a/tools/libime_migrate_fcitx4_pinyin.cpp b/tools/libime_migrate_fcitx4_pinyin.cpp index f8a2443..54ee35c 100644 --- a/tools/libime_migrate_fcitx4_pinyin.cpp +++ b/tools/libime_migrate_fcitx4_pinyin.cpp @@ -9,11 +9,9 @@ #include "libime/core/utils.h" #include "libime/core/utils_p.h" #include "libime/pinyin/pinyindictionary.h" -#include "libime/pinyin/pinyinencoder.h" #include #include #include -#include #include #include #include diff --git a/tools/libime_migrate_fcitx4_table.cpp b/tools/libime_migrate_fcitx4_table.cpp index 298324c..ea78869 100644 --- a/tools/libime_migrate_fcitx4_table.cpp +++ b/tools/libime_migrate_fcitx4_table.cpp @@ -15,9 +15,7 @@ #include #include #include -#include #include -#include #if __GNUC__ <= 8 #include diff --git a/tools/libime_pinyindict.cpp b/tools/libime_pinyindict.cpp index 79c40ee..738b0c7 100644 --- a/tools/libime_pinyindict.cpp +++ b/tools/libime_pinyindict.cpp @@ -6,10 +6,9 @@ #include "libime/core/utils.h" #include "libime/pinyin/pinyindictionary.h" -#include "libime/pinyin/pinyinencoder.h" #include #include -#include +#include #include void usage(const char *argv0) { diff --git a/tools/libime_prediction.cpp b/tools/libime_prediction.cpp index faa11a4..882ed20 100644 --- a/tools/libime_prediction.cpp +++ b/tools/libime_prediction.cpp @@ -11,7 +11,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/tools/libime_tabledict.cpp b/tools/libime_tabledict.cpp index 6c4d455..17b560f 100644 --- a/tools/libime_tabledict.cpp +++ b/tools/libime_tabledict.cpp @@ -6,11 +6,10 @@ #include "libime/table/tablebaseddictionary.h" #include -#include +#include #include #include #include -#include void usage(const char *argv0) { std::cout << "Usage: " << argv0