am 6afd14dc: Remove unused method.

* commit '6afd14dc9488aab7c2f982f9b18931c3b3a20e75':
  Remove unused method.
main
Keisuke Kuroyanagi 2014-06-27 06:35:59 +00:00 committed by Android Git Automerger
commit bc6c4666ed
2 changed files with 0 additions and 28 deletions

View File

@ -77,30 +77,6 @@ template<class DictConstants, class DictBuffers, class DictBuffersPtr>
return dictBuffers->flush(dirPath);
}
/* static */ bool DictFileWritingUtils::flushAllHeaderAndBodyToFile(const char *const filePath,
BufferWithExtendableBuffer *const dictHeader, BufferWithExtendableBuffer *const dictBody) {
const int tmpFileNameBufSize = FileUtils::getFilePathWithSuffixBufSize(filePath,
TEMP_FILE_SUFFIX_FOR_WRITING_DICT_FILE);
// Name of a temporary file used for writing that is a connected string of original name and
// TEMP_FILE_SUFFIX_FOR_WRITING_DICT_FILE.
char tmpFileName[tmpFileNameBufSize];
FileUtils::getFilePathWithSuffix(filePath, TEMP_FILE_SUFFIX_FOR_WRITING_DICT_FILE,
tmpFileNameBufSize, tmpFileName);
if (!DictFileWritingUtils::flushBufferToFile(tmpFileName, dictHeader)) {
AKLOGE("Dictionary header cannot be written to %s.", tmpFileName);
return false;
}
if (!DictFileWritingUtils::flushBufferToFile(tmpFileName, dictBody)) {
AKLOGE("Dictionary structure cannot be written to %s.", tmpFileName);
return false;
}
if (rename(tmpFileName, filePath) != 0) {
AKLOGE("Dictionary file %s cannot be renamed to %s", tmpFileName, filePath);;
return false;
}
return true;
}
/* static */ bool DictFileWritingUtils::flushBufferToFileWithSuffix(const char *const basePath,
const char *const suffix, const BufferWithExtendableBuffer *const buffer) {
const int filePathBufSize = FileUtils::getFilePathWithSuffixBufSize(basePath, suffix);

View File

@ -35,10 +35,6 @@ class DictFileWritingUtils {
const std::vector<int> localeAsCodePointVector,
const DictionaryHeaderStructurePolicy::AttributeMap *const attributeMap);
static bool flushAllHeaderAndBodyToFile(const char *const filePath,
BufferWithExtendableBuffer *const dictHeader,
BufferWithExtendableBuffer *const dictBody);
static bool flushBufferToFileWithSuffix(const char *const basePath, const char *const suffix,
const BufferWithExtendableBuffer *const buffer);