Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

rename bin_file to binfile

  • Loading branch information...
commit 1f811cb28e6ed1d0c1665943dd37025cdca1381e 1 parent 1b31409
@epico epico authored
Showing with 12 additions and 12 deletions.
  1. +4 −4 tests/tests_helper.h
  2. +8 −8 utils/utils_helper.h
View
8 tests/tests_helper.h
@@ -25,16 +25,16 @@
static bool load_phrase_index(FacadePhraseIndex * phrase_index){
MemoryChunk * chunk = NULL;
for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
- const char * bin_file = pinyin_phrase_files[i];
- if (NULL == bin_file)
+ const char * binfile = pinyin_phrase_files[i];
+ if (NULL == binfile)
continue;
gchar * filename = g_build_filename("..", "..", "data",
- bin_file, NULL);
+ binfile, NULL);
chunk = new MemoryChunk;
bool retval = chunk->load(filename);
if (!retval) {
- fprintf(stderr, "open %s failed!\n", bin_file);
+ fprintf(stderr, "open %s failed!\n", binfile);
return false;
}
View
16 utils/utils_helper.h
@@ -26,14 +26,14 @@
static bool load_phrase_index(FacadePhraseIndex * phrase_index) {
MemoryChunk * chunk = NULL;
for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
- const char * bin_file = pinyin_phrase_files[i];
- if (NULL == bin_file)
+ const char * binfile = pinyin_phrase_files[i];
+ if (NULL == binfile)
continue;
chunk = new MemoryChunk;
- bool retval = chunk->load(bin_file);
+ bool retval = chunk->load(binfile);
if (!retval) {
- fprintf(stderr, "load %s failed!\n", bin_file);
+ fprintf(stderr, "load %s failed!\n", binfile);
return false;
}
@@ -45,15 +45,15 @@ static bool load_phrase_index(FacadePhraseIndex * phrase_index) {
static bool save_phrase_index(FacadePhraseIndex * phrase_index) {
MemoryChunk * new_chunk = NULL;
for (size_t i = 0; i < PHRASE_INDEX_LIBRARY_COUNT; ++i) {
- const char * bin_file = pinyin_phrase_files[i];
- if (NULL == bin_file)
+ const char * binfile = pinyin_phrase_files[i];
+ if (NULL == binfile)
continue;
new_chunk = new MemoryChunk;
phrase_index->store(i, new_chunk);
- bool retval = new_chunk->save(bin_file);
+ bool retval = new_chunk->save(binfile);
if (!retval) {
- fprintf(stderr, "save %s failed.", bin_file);
+ fprintf(stderr, "save %s failed.", binfile);
return false;
}
Please sign in to comment.
Something went wrong with that request. Please try again.