std::function

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2022-03-29 19:58:56 -07:00
parent c4eedd6ae4
commit c0868aff31
2 changed files with 6 additions and 4 deletions

View File

@ -10,6 +10,8 @@
#include "metadatum.hpp"
#include "properties.hpp"
#include <functional>
// *****************************************************************************
// namespace extensions
namespace Exiv2 {
@ -312,7 +314,7 @@ class EXIV2API XmpParser {
@param pLockData Pointer to the pLockData passed to initialize()
@param lockUnlock Indicates whether to lock (true) or unlock (false)
*/
using XmpLockFct = void (*)(void* pLockData, bool lockUnlock);
using XmpLockFct = std::function<void(void* pLockData, bool lockUnlock)>;
/*!
@brief Initialize the XMP Toolkit.

View File

@ -26,10 +26,10 @@ struct CrwSubDir;
// type definitions
//! Function pointer for functions to decode Exif tags from a CRW entry
using CrwDecodeFct = void (*)(const CiffComponent&, const CrwMapping*, Image&, ByteOrder);
using CrwDecodeFct = std::function<void(const CiffComponent&, const CrwMapping*, Image&, ByteOrder)>;
//! Function pointer for functions to encode CRW entries from Exif tags
using CrwEncodeFct = void (*)(const Image&, const CrwMapping*, CiffHeader*);
using CrwEncodeFct = std::function<void(const Image&, const CrwMapping*, CiffHeader*)>;
//! Stack to hold a path of CRW directories
using CrwDirs = std::stack<CrwSubDir>;
@ -501,7 +501,7 @@ struct CrwMapping {
//@{
//! Default constructor
CrwMapping(uint16_t crwTagId, uint16_t crwDir, uint32_t size, uint16_t tag, Internal::IfdId ifdId,
CrwDecodeFct toExif, CrwEncodeFct fromExif) :
const CrwDecodeFct& toExif, const CrwEncodeFct& fromExif) :
crwTagId_(crwTagId),
crwDir_(crwDir),
size_(size),