chore: typo

This commit is contained in:
TaurusXin 2024-10-21 16:15:12 +08:00
parent 6af854b376
commit 22768594ba
Signed by: taurusxin
GPG Key ID: C334DCA04AC2D2CC
2 changed files with 4 additions and 4 deletions

View File

@ -47,7 +47,7 @@ private:
NcmFormat mFormat; NcmFormat mFormat;
std::string mImageData; std::string mImageData;
std::ifstream mFile; std::ifstream mFile;
unsigned char mKeyBox[256]; unsigned char mKeyBox[256]{};
NeteaseMusicMetadata* mMetaData; NeteaseMusicMetadata* mMetaData;
private: private:

View File

@ -224,7 +224,7 @@ void NeteaseCrypt::FixMetadata()
audioFile = new TagLib::MPEG::File(mDumpFilepath.c_str()); audioFile = new TagLib::MPEG::File(mDumpFilepath.c_str());
tag = dynamic_cast<TagLib::MPEG::File *>(audioFile)->ID3v2Tag(true); tag = dynamic_cast<TagLib::MPEG::File *>(audioFile)->ID3v2Tag(true);
if (mImageData.length() > 0) if (!mImageData.empty())
{ {
TagLib::ID3v2::AttachedPictureFrame *frame = new TagLib::ID3v2::AttachedPictureFrame; TagLib::ID3v2::AttachedPictureFrame *frame = new TagLib::ID3v2::AttachedPictureFrame;
@ -239,7 +239,7 @@ void NeteaseCrypt::FixMetadata()
audioFile = new TagLib::FLAC::File(mDumpFilepath.c_str()); audioFile = new TagLib::FLAC::File(mDumpFilepath.c_str());
tag = audioFile->tag(); tag = audioFile->tag();
if (mImageData.length() > 0) if (!mImageData.empty())
{ {
TagLib::FLAC::Picture *cover = new TagLib::FLAC::Picture; TagLib::FLAC::Picture *cover = new TagLib::FLAC::Picture;
cover->setMimeType(mimeType(mImageData)); cover->setMimeType(mimeType(mImageData));
@ -301,7 +301,7 @@ void NeteaseCrypt::Dump(std::string const &outputDir = "")
mFormat = NeteaseCrypt::FLAC; mFormat = NeteaseCrypt::FLAC;
} }
output.open(mDumpFilepath, output.out | output.binary); output.open(mDumpFilepath, std::ofstream::out | std::ofstream::binary);
} }
output.write((char *)buffer.data(), n); output.write((char *)buffer.data(), n);