Minor cleanup (memset -> std::memset, memcpy -> std::memcpy).
This commit is contained in:
+5
-4
@@ -44,6 +44,7 @@ EXIV2_RCSID("@(#) $Id$")
|
||||
#include <sstream>
|
||||
#include <iomanip>
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
|
||||
// *****************************************************************************
|
||||
// class member definitions
|
||||
@@ -1434,7 +1435,7 @@ namespace Exiv2 {
|
||||
long MinoltaMakerNote::assemble(Entry& e, IfdId ifdId, uint16_t tag, ByteOrder /*byteOrder*/) const
|
||||
{
|
||||
DataBuf buf(1024);
|
||||
memset(buf.pData_, 0x0, 1024);
|
||||
std::memset(buf.pData_, 0x0, 1024);
|
||||
uint16_t len = 0;
|
||||
Entries::const_iterator end = entries_.end();
|
||||
for (Entries::const_iterator i = entries_.begin(); i != end; ++i) {
|
||||
@@ -1442,7 +1443,7 @@ namespace Exiv2 {
|
||||
uint16_t pos = i->tag() * 2;
|
||||
uint16_t size = pos + static_cast<uint16_t>(i->size());
|
||||
assert(size <= 1024);
|
||||
memcpy(buf.pData_ + pos, i->data(), i->size());
|
||||
std::memcpy(buf.pData_ + pos, i->data(), i->size());
|
||||
if (len < size) len = size;
|
||||
}
|
||||
}
|
||||
@@ -1459,7 +1460,7 @@ namespace Exiv2 {
|
||||
long MinoltaMakerNote::assembleStd(Entry& e, IfdId ifdId, uint32_t tag, ByteOrder /*byteOrder*/) const
|
||||
{
|
||||
DataBuf buf(1024);
|
||||
memset(buf.pData_, 0x0, 1024);
|
||||
std::memset(buf.pData_, 0x0, 1024);
|
||||
uint32_t len = 0;
|
||||
Entries::const_iterator end = entries_.end();
|
||||
for (Entries::const_iterator i = entries_.begin(); i != end; ++i) {
|
||||
@@ -1467,7 +1468,7 @@ namespace Exiv2 {
|
||||
uint32_t pos = i->tag() * 4;
|
||||
uint32_t size = pos + static_cast<uint32_t>(i->size());
|
||||
assert(size <= 1024);
|
||||
memcpy(buf.pData_ + pos, i->data(), i->size());
|
||||
std::memcpy(buf.pData_ + pos, i->data(), i->size());
|
||||
if (len < size) len = size;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user