Remove unused method.

Bug: 13664080
Change-Id: I47fd90f01ea9a18b11037c966150fa5fd926101b
main
Keisuke Kuroyanagi 2014-06-27 14:09:57 +09:00
parent 79beb223fc
commit 6afd14dc94
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);