Skip to content

Commit 564d104

Browse files
author
Fcitx Bot
committed
Merge remote-tracking branch 'origin/master' into fcitx
2 parents 26536a8 + 9ea1aa0 commit 564d104

33 files changed

+282
-331
lines changed

src/base/win32/com.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ inline wil::unique_bstr MakeUniqueBSTR(const wchar_t *source) {
145145
// Note: this behavior is different from IUnknown methods. Check COM interface
146146
// documentation to make sure the returned error codes are correct.
147147
template <typename T, typename U>
148-
requires std::integral<T> && std::integral<U>
149148
HResult SaveToOutParam(T value, U *absl_nullable out);
150149
template <typename T, typename U>
151150
HResult SaveToOutParam(T *absl_nullable value, U **absl_nullable out);
@@ -169,7 +168,6 @@ void SaveToOptionalOutParam(T value, U *absl_nullable out);
169168
// Implementations.
170169

171170
template <typename T, typename U>
172-
requires std::integral<T> && std::integral<U>
173171
HResult SaveToOutParam(T value, U *absl_nullable out) {
174172
static_assert(std::convertible_to<T, U>);
175173
if (out == nullptr) {

src/converter/BUILD.bazel

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ mozc_cc_library(
108108
"//engine:__pkg__",
109109
"//prediction:__pkg__",
110110
"//rewriter:__pkg__",
111+
"//session:__pkg__",
111112
],
112113
)
113114

@@ -411,6 +412,7 @@ mozc_cc_library(
411412
deps = [
412413
":segments",
413414
"//request:conversion_request",
415+
"@com_google_absl//absl/base:core_headers",
414416
],
415417
)
416418

@@ -731,6 +733,7 @@ mozc_cc_binary(
731733
"//engine:eval_engine_data",
732734
],
733735
deps = [
736+
":attribute",
734737
":converter_interface",
735738
":lattice",
736739
":pos_id_printer",

src/converter/attribute.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,7 @@ namespace converter {
3838
// explicit casting.
3939
class Attribute {
4040
public:
41-
// TODO(taku): Can use unnamed enum after full migration.
42-
enum Attribute_ {
41+
enum {
4342
DEFAULT_ATTRIBUTE = 0,
4443
// this was the best candidate before learning
4544
BEST_CANDIDATE = 1 << 0,

src/converter/candidate.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737
#include <tuple>
3838
#include <vector>
3939

40-
#include "absl/base/attributes.h"
4140
#include "absl/strings/string_view.h"
4241
#include "absl/types/span.h"
4342
#include "base/number_util.h"
@@ -63,11 +62,6 @@ class Candidate {
6362
public:
6463
Candidate() = default;
6564

66-
// Allows to refer Attribute via Candidate::XXX
67-
// TODO(taku): Remove this alias after full migration.
68-
using Attribute = converter::Attribute::Attribute_;
69-
using enum converter::Attribute::Attribute_;
70-
7165
enum Command {
7266
DEFAULT_COMMAND = 0,
7367
ENABLE_INCOGNITO_MODE, // enables "incognito mode".
@@ -170,11 +164,6 @@ class Candidate {
170164
// value.substr(content_value.size(), value.size() - content_value.size());
171165
absl::string_view functional_value() const;
172166

173-
// inner_segments() always returns valid information, so
174-
// IsValid() can return always true.
175-
// TODO(taku): Remove this method.
176-
ABSL_DEPRECATED("IsValid() always returns true.")
177-
bool IsValid() const { return true; }
178167
std::string DebugString() const;
179168

180169
friend std::ostream &operator<<(std::ostream &os,

src/converter/candidate_test.cc

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -42,26 +42,8 @@ namespace converter {
4242

4343
TEST(CandidateTest, IsValid) {
4444
Candidate c;
45-
EXPECT_TRUE(c.IsValid());
46-
4745
c.key = "key";
4846
c.value = "value";
49-
c.content_key = "content_key";
50-
c.content_value = "content_value";
51-
c.prefix = "prefix";
52-
c.suffix = "suffix";
53-
c.description = "description";
54-
c.usage_title = "usage_title";
55-
c.usage_description = "usage_description";
56-
c.cost = 1;
57-
c.wcost = 2;
58-
c.structure_cost = 3;
59-
c.lid = 4;
60-
c.rid = 5;
61-
c.attributes = 6;
62-
c.style = NumberUtil::NumberString::NUMBER_CIRCLED;
63-
c.command = Candidate::DISABLE_PRESENTATION_MODE;
64-
EXPECT_TRUE(c.IsValid()); // Empty inner_segment_boundary
6547

6648
// Valid inner_segment_boundary.
6749
EXPECT_FALSE(

0 commit comments

Comments
 (0)