mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Remove unused method.
Bug: 13664080 Change-Id: I47fd90f01ea9a18b11037c966150fa5fd926101b
This commit is contained in:
parent
79beb223fc
commit
6afd14dc94
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user