mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-03 00:49:01 +08:00
Merge pull request #915 from stweil/tessdatamanager
Remove unused methods from Tessdatamanager
This commit is contained in:
commit
8b939b0cef
@ -33,13 +33,6 @@
|
||||
|
||||
namespace tesseract {
|
||||
|
||||
// Lazily loads from the the given filename. Won't actually read the file
|
||||
// until it needs it.
|
||||
void TessdataManager::LoadFileLater(const char *data_file_name) {
|
||||
Clear();
|
||||
data_file_name_ = data_file_name;
|
||||
}
|
||||
|
||||
bool TessdataManager::Init(const char *data_file_name) {
|
||||
GenericVector<char> data;
|
||||
if (reader_ == nullptr) {
|
||||
@ -80,14 +73,6 @@ bool TessdataManager::LoadMemBuffer(const char *name, const char *data,
|
||||
return true;
|
||||
}
|
||||
|
||||
// Overwrites a single entry of the given type.
|
||||
void TessdataManager::OverwriteEntry(TessdataType type, const char *data,
|
||||
int size) {
|
||||
is_loaded_ = true;
|
||||
entries_[type].resize_no_init(size);
|
||||
memcpy(&entries_[type][0], data, size);
|
||||
}
|
||||
|
||||
// Saves to the given filename.
|
||||
bool TessdataManager::SaveFile(const STRING &filename,
|
||||
FileWriter writer) const {
|
||||
|
@ -128,9 +128,6 @@ class TessdataManager {
|
||||
bool swap() const { return swap_; }
|
||||
bool is_loaded() const { return is_loaded_; }
|
||||
|
||||
// Lazily loads from the the given filename. Won't actually read the file
|
||||
// until it needs it.
|
||||
void LoadFileLater(const char *data_file_name);
|
||||
/**
|
||||
* Opens and reads the given data file right now.
|
||||
* @return true on success.
|
||||
@ -139,8 +136,6 @@ class TessdataManager {
|
||||
// Loads from the given memory buffer as if a file, remembering name as some
|
||||
// arbitrary source id for caching.
|
||||
bool LoadMemBuffer(const char *name, const char *data, int size);
|
||||
// Overwrites a single entry of the given type.
|
||||
void OverwriteEntry(TessdataType type, const char *data, int size);
|
||||
|
||||
// Saves to the given filename.
|
||||
bool SaveFile(const STRING &filename, FileWriter writer) const;
|
||||
|
Loading…
Reference in New Issue
Block a user