Skip to content

Commit

Permalink
Rename ZipFileReader::Load to LoadBytes
Browse files Browse the repository at this point in the history
  • Loading branch information
lpugin committed May 23, 2024
1 parent 971ecf7 commit d64db41
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion include/vrv/filereader.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class ZipFileReader {
/**
* Load a vector into memory
*/
bool Load(const std::vector<unsigned char> &bytes);
bool LoadBytes(const std::vector<unsigned char> &bytes);

/**
* Check if the archive contains the file
Expand Down
6 changes: 3 additions & 3 deletions src/filereader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ bool ZipFileReader::Load(const std::string &filename)
data = data.substr(data.find("base64,") + 7);
}
std::vector<unsigned char> bytes = Base64Decode(data);
return this->Load(bytes);
return this->LoadBytes(bytes);
#else
std::ifstream fin(filename.c_str(), std::ios::in | std::ios::binary);
if (!fin.is_open()) {
Expand All @@ -74,11 +74,11 @@ bool ZipFileReader::Load(const std::string &filename)
while (fin.read((char *)&buffer, sizeof(unsigned char))) {
bytes.push_back(buffer);
}
return this->Load(bytes);
return this->LoadBytes(bytes);
#endif
}

bool ZipFileReader::Load(const std::vector<unsigned char> &bytes)
bool ZipFileReader::LoadBytes(const std::vector<unsigned char> &bytes)
{
this->Reset();

Expand Down
2 changes: 1 addition & 1 deletion src/toolkit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ bool Toolkit::LoadZipData(const std::vector<unsigned char> &bytes)
{
#ifndef NO_MXL_SUPPORT
ZipFileReader zipFileReader;
zipFileReader.Load(bytes);
zipFileReader.LoadBytes(bytes);

const std::string metaInf = "META-INF/container.xml";
if (!zipFileReader.HasFile(metaInf)) {
Expand Down

0 comments on commit d64db41

Please sign in to comment.