Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LatinIME
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
keyboard
LatinIME
Commits
19e13df9
Commit
19e13df9
authored
12 years ago
by
Ken Wakasa
Browse files
Options
Downloads
Patches
Plain Diff
Remove a duplicated method
Change-Id: I41bd0612bf42d549d1acf0d733b689fce68aa8a1
parent
56012e5a
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
native/jni/src/bigram_dictionary.cpp
+2
-1
2 additions, 1 deletion
native/jni/src/bigram_dictionary.cpp
native/jni/src/dictionary.h
+0
-16
0 additions, 16 deletions
native/jni/src/dictionary.h
with
2 additions
and
17 deletions
native/jni/src/bigram_dictionary.cpp
+
2
−
1
View file @
19e13df9
...
@@ -21,6 +21,7 @@
...
@@ -21,6 +21,7 @@
#include
"bigram_dictionary.h"
#include
"bigram_dictionary.h"
#include
"binary_format.h"
#include
"binary_format.h"
#include
"bloom_filter.h"
#include
"bloom_filter.h"
#include
"char_utils.h"
#include
"defines.h"
#include
"defines.h"
#include
"dictionary.h"
#include
"dictionary.h"
...
@@ -50,7 +51,7 @@ void BigramDictionary::addWordBigram(int *word, int length, int frequency, int *
...
@@ -50,7 +51,7 @@ void BigramDictionary::addWordBigram(int *word, int length, int frequency, int *
int
insertAt
=
0
;
int
insertAt
=
0
;
while
(
insertAt
<
MAX_RESULTS
)
{
while
(
insertAt
<
MAX_RESULTS
)
{
if
(
frequency
>
bigramFreq
[
insertAt
]
||
(
bigramFreq
[
insertAt
]
==
frequency
if
(
frequency
>
bigramFreq
[
insertAt
]
||
(
bigramFreq
[
insertAt
]
==
frequency
&&
length
<
Dictionary
::
wideStrLen
(
&&
length
<
getCodePointCount
(
MAX_WORD_LENGTH
,
bigramCodePoints
+
insertAt
*
MAX_WORD_LENGTH
)))
{
bigramCodePoints
+
insertAt
*
MAX_WORD_LENGTH
)))
{
break
;
break
;
}
}
...
...
This diff is collapsed.
Click to expand it.
native/jni/src/dictionary.h
+
0
−
16
View file @
19e13df9
...
@@ -65,10 +65,6 @@ class Dictionary {
...
@@ -65,10 +65,6 @@ class Dictionary {
int
getDictBufAdjust
()
const
{
return
mDictBufAdjust
;
}
int
getDictBufAdjust
()
const
{
return
mDictBufAdjust
;
}
virtual
~
Dictionary
();
virtual
~
Dictionary
();
// public static utility methods
// static inline methods should be defined in the header file
static
int
wideStrLen
(
int
*
str
);
private
:
private
:
DISALLOW_IMPLICIT_CONSTRUCTORS
(
Dictionary
);
DISALLOW_IMPLICIT_CONSTRUCTORS
(
Dictionary
);
const
uint8_t
*
mDict
;
const
uint8_t
*
mDict
;
...
@@ -84,17 +80,5 @@ class Dictionary {
...
@@ -84,17 +80,5 @@ class Dictionary {
const
BigramDictionary
*
mBigramDictionary
;
const
BigramDictionary
*
mBigramDictionary
;
SuggestInterface
*
mGestureSuggest
;
SuggestInterface
*
mGestureSuggest
;
};
};
// public static utility methods
// static inline methods should be defined in the header file
inline
int
Dictionary
::
wideStrLen
(
int
*
str
)
{
if
(
!
str
)
return
0
;
int
length
=
0
;
while
(
*
str
)
{
str
++
;
length
++
;
}
return
length
;
}
}
// namespace latinime
}
// namespace latinime
#endif // LATINIME_DICTIONARY_H
#endif // LATINIME_DICTIONARY_H
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment