summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeng Wu <alexepico@gmail.com>2012-05-16 14:20:09 +0800
committerPeng Wu <alexepico@gmail.com>2012-05-16 14:20:09 +0800
commit6c7f7766ad087234c45f0d4115e59faaf34bcadf (patch)
tree77f8dc53c9dfa49bd03786b0d00a237661f02360
parent6b86007755f0551e96c7d3796101e7889f5b4c3d (diff)
downloadlibpinyin-6c7f7766ad087234c45f0d4115e59faaf34bcadf.tar.gz
libpinyin-6c7f7766ad087234c45f0d4115e59faaf34bcadf.tar.xz
libpinyin-6c7f7766ad087234c45f0d4115e59faaf34bcadf.zip
polish phrase_index.h
-rw-r--r--src/storage/phrase_index.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/storage/phrase_index.h b/src/storage/phrase_index.h
index 7e7739e..45194eb 100644
--- a/src/storage/phrase_index.h
+++ b/src/storage/phrase_index.h
@@ -662,8 +662,8 @@ public:
for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
SubPhraseIndex * sub_phrase = m_sub_phrase_indices[i];
if (sub_phrase) {
- GArray * & onerange = ranges[i];
- onerange = g_array_new(FALSE, FALSE, sizeof(PhraseIndexRange));
+ GArray * & range = ranges[i];
+ range = g_array_new(FALSE, FALSE, sizeof(PhraseIndexRange));
}
}
return true;
@@ -679,9 +679,9 @@ public:
*/
bool clear_ranges(PhraseIndexRanges ranges) {
for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
- GArray * onerange = ranges[i];
- if (onerange) {
- g_array_set_size(onerange, 0);
+ GArray * range = ranges[i];
+ if (range) {
+ g_array_set_size(range, 0);
}
}
}
@@ -696,10 +696,10 @@ public:
*/
bool destroy_ranges(PhraseIndexRanges ranges) {
for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
- GArray * & onerange = ranges[i];
- if (onerange) {
- g_array_free(onerange, TRUE);
- onerange = NULL;
+ GArray * & range = ranges[i];
+ if (range) {
+ g_array_free(range, TRUE);
+ range = NULL;
}
}
return true;