Skip to content

Commit 0e90364

Browse files
committed
use Blob instead of std::vector<byte>
Signed-off-by: Rosen Penev <[email protected]>
1 parent b869e81 commit 0e90364

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

include/exiv2/types.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ struct EXIV2API DataBuf {
196196
}
197197

198198
private:
199-
std::vector<byte> pData_;
199+
Blob pData_;
200200
};
201201

202202
/*!

samples/mmap-test.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ int main(int argc, char* const argv[]) {
2525
}
2626
// Map it to memory
2727
const Exiv2::byte* pData = file.mmap();
28-
std::vector<byte> buf(file.size());
28+
Blob buf(file.size());
2929

3030
// Read from the memory mapped region
3131
std::copy_n(pData, buf.size(), buf.begin());

src/crwimage_int.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ class CiffHeader {
456456
std::unique_ptr<CiffDirectory> pRootDir_; //!< Pointer to the root directory
457457
ByteOrder byteOrder_ = littleEndian; //!< Applicable byte order
458458
uint32_t offset_ = 0; //!< Offset to the start of the root dir
459-
std::vector<byte> pPadding_; //!< the (unknown) remainder
459+
Blob pPadding_; //!< the (unknown) remainder
460460
uint32_t padded_ = 0; //!< Number of padding-bytes
461461

462462
}; // class CiffHeader

src/jp2image.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ void Jp2Image::readMetadata() {
184184
throw Error(ErrorCode::kerCorruptedMetadata);
185185
}
186186
boxFileTypeFound = true;
187-
std::vector<byte> boxData(box.length - boxHSize);
187+
Blob boxData(box.length - boxHSize);
188188
io_->readOrThrow(boxData.data(), boxData.size(), ErrorCode::kerCorruptedMetadata);
189189
if (!Internal::isValidBoxFileType(boxData))
190190
throw Error(ErrorCode::kerCorruptedMetadata);
@@ -444,7 +444,7 @@ void Jp2Image::printStructure(std::ostream& out, PrintStructureOption option, si
444444
case kJp2BoxType::FileTypeBox: {
445445
// This box shall immediately follow the JPEG 2000 Signature box
446446
/// \todo All files shall contain one and only one File Type box.
447-
std::vector<byte> boxData(box.length - boxHSize);
447+
Blob boxData(box.length - boxHSize);
448448
io_->readOrThrow(boxData.data(), boxData.size(), ErrorCode::kerCorruptedMetadata);
449449
if (!Internal::isValidBoxFileType(boxData))
450450
throw Error(ErrorCode::kerCorruptedMetadata);

0 commit comments

Comments
 (0)