clang-tidy: use using
Found with modernize-use-using Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
parent
b3040da54c
commit
bd6a996181
@ -25,7 +25,7 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
typedef Exiv2::ExifData::const_iterator (*EasyAccessFct)(const Exiv2::ExifData& ed);
|
using EasyAccessFct = Exiv2::ExifData::const_iterator (*)(const Exiv2::ExifData&);
|
||||||
|
|
||||||
struct EasyAccess {
|
struct EasyAccess {
|
||||||
const char* label_;
|
const char* label_;
|
||||||
|
|||||||
@ -26,9 +26,15 @@
|
|||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
typedef std::map<std::string,int> format_t;
|
using format_t = std::map<std::string, int>;
|
||||||
typedef format_t::const_iterator format_i;
|
using format_i = format_t::const_iterator;
|
||||||
typedef enum { wolf , csv , json , xml } format_e;
|
enum format_e
|
||||||
|
{
|
||||||
|
wolf,
|
||||||
|
csv,
|
||||||
|
json,
|
||||||
|
xml
|
||||||
|
};
|
||||||
|
|
||||||
void syntax(const char* argv[],format_t& formats)
|
void syntax(const char* argv[],format_t& formats)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -60,7 +60,7 @@ struct Token {
|
|||||||
bool a; // name is an array eg History[]
|
bool a; // name is an array eg History[]
|
||||||
int i; // index (indexed from 1) eg History[1]/stEvt:action
|
int i; // index (indexed from 1) eg History[1]/stEvt:action
|
||||||
};
|
};
|
||||||
typedef std::vector<Token> Tokens;
|
using Tokens = std::vector<Token>;
|
||||||
|
|
||||||
// "XMP.xmp.MP.RegionInfo/MPRI:Regions[1]/MPReg:Rectangle"
|
// "XMP.xmp.MP.RegionInfo/MPRI:Regions[1]/MPReg:Rectangle"
|
||||||
bool getToken(std::string& in,Token& token, std::set<std::string>* pNS=NULL)
|
bool getToken(std::string& in,Token& token, std::set<std::string>* pNS=NULL)
|
||||||
|
|||||||
@ -156,9 +156,9 @@ enum
|
|||||||
class Position;
|
class Position;
|
||||||
|
|
||||||
// globals
|
// globals
|
||||||
typedef std::map<time_t,Position> TimeDict_t;
|
using TimeDict_t = std::map<time_t, Position>;
|
||||||
typedef std::map<time_t,Position>::iterator TimeDict_i;
|
using TimeDict_i = std::map<time_t, Position>::iterator;
|
||||||
typedef std::vector<std::string> strings_t;
|
using strings_t = std::vector<std::string>;
|
||||||
const char* gDeg = NULL ; // string "°" or "deg"
|
const char* gDeg = NULL ; // string "°" or "deg"
|
||||||
TimeDict_t gTimeDict ;
|
TimeDict_t gTimeDict ;
|
||||||
strings_t gFiles;
|
strings_t gFiles;
|
||||||
|
|||||||
@ -65,7 +65,7 @@ namespace Action {
|
|||||||
class Task {
|
class Task {
|
||||||
public:
|
public:
|
||||||
//! Shortcut for an auto pointer.
|
//! Shortcut for an auto pointer.
|
||||||
typedef std::unique_ptr<Task> UniquePtr;
|
using UniquePtr = std::unique_ptr<Task>;
|
||||||
//! Virtual destructor.
|
//! Virtual destructor.
|
||||||
virtual ~Task();
|
virtual ~Task();
|
||||||
//! Virtual copy construction.
|
//! Virtual copy construction.
|
||||||
@ -150,7 +150,7 @@ namespace Action {
|
|||||||
//! Pointer to the one and only instance of this class.
|
//! Pointer to the one and only instance of this class.
|
||||||
static TaskFactory* instance_;
|
static TaskFactory* instance_;
|
||||||
//! Type used to store Task prototype classes
|
//! Type used to store Task prototype classes
|
||||||
typedef std::map<TaskType, Task*> Registry;
|
using Registry = std::map<TaskType, Task*>;
|
||||||
//! List of task types and corresponding prototypes.
|
//! List of task types and corresponding prototypes.
|
||||||
Registry registry_;
|
Registry registry_;
|
||||||
|
|
||||||
@ -161,7 +161,7 @@ namespace Action {
|
|||||||
public:
|
public:
|
||||||
virtual ~Print();
|
virtual ~Print();
|
||||||
virtual int run(const std::string& path);
|
virtual int run(const std::string& path);
|
||||||
typedef std::unique_ptr<Print> UniquePtr;
|
using UniquePtr = std::unique_ptr<Print>;
|
||||||
UniquePtr clone() const;
|
UniquePtr clone() const;
|
||||||
|
|
||||||
//! Print the Jpeg comment
|
//! Print the Jpeg comment
|
||||||
@ -191,7 +191,7 @@ namespace Action {
|
|||||||
const std::string& key,
|
const std::string& key,
|
||||||
const std::string& label ="") const;
|
const std::string& label ="") const;
|
||||||
//! Type for an Exiv2 Easy access function
|
//! Type for an Exiv2 Easy access function
|
||||||
typedef Exiv2::ExifData::const_iterator (*EasyAccessFct)(const Exiv2::ExifData& ed);
|
using EasyAccessFct = Exiv2::ExifData::const_iterator (*)(const Exiv2::ExifData& ed);
|
||||||
/*!
|
/*!
|
||||||
@brief Print one summary line with a label (if provided) and requested
|
@brief Print one summary line with a label (if provided) and requested
|
||||||
data. A line break is printed only if a label is provided.
|
data. A line break is printed only if a label is provided.
|
||||||
@ -217,7 +217,7 @@ namespace Action {
|
|||||||
public:
|
public:
|
||||||
virtual ~Rename();
|
virtual ~Rename();
|
||||||
virtual int run(const std::string& path);
|
virtual int run(const std::string& path);
|
||||||
typedef std::unique_ptr<Rename> UniquePtr;
|
using UniquePtr = std::unique_ptr<Rename>;
|
||||||
UniquePtr clone() const;
|
UniquePtr clone() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -229,7 +229,7 @@ namespace Action {
|
|||||||
public:
|
public:
|
||||||
virtual ~Adjust();
|
virtual ~Adjust();
|
||||||
virtual int run(const std::string& path);
|
virtual int run(const std::string& path);
|
||||||
typedef std::unique_ptr<Adjust> UniquePtr;
|
using UniquePtr = std::unique_ptr<Adjust>;
|
||||||
UniquePtr clone() const;
|
UniquePtr clone() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -252,7 +252,7 @@ namespace Action {
|
|||||||
public:
|
public:
|
||||||
virtual ~Erase();
|
virtual ~Erase();
|
||||||
virtual int run(const std::string& path);
|
virtual int run(const std::string& path);
|
||||||
typedef std::unique_ptr<Erase> UniquePtr;
|
using UniquePtr = std::unique_ptr<Erase>;
|
||||||
UniquePtr clone() const;
|
UniquePtr clone() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -294,7 +294,7 @@ namespace Action {
|
|||||||
public:
|
public:
|
||||||
virtual ~Extract();
|
virtual ~Extract();
|
||||||
virtual int run(const std::string& path);
|
virtual int run(const std::string& path);
|
||||||
typedef std::unique_ptr<Extract> UniquePtr;
|
using UniquePtr = std::unique_ptr<Extract>;
|
||||||
UniquePtr clone() const;
|
UniquePtr clone() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -333,7 +333,7 @@ namespace Action {
|
|||||||
public:
|
public:
|
||||||
virtual ~Insert();
|
virtual ~Insert();
|
||||||
virtual int run(const std::string& path);
|
virtual int run(const std::string& path);
|
||||||
typedef std::unique_ptr<Insert> UniquePtr;
|
using UniquePtr = std::unique_ptr<Insert>;
|
||||||
UniquePtr clone() const;
|
UniquePtr clone() const;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -374,7 +374,7 @@ namespace Action {
|
|||||||
public:
|
public:
|
||||||
virtual ~Modify();
|
virtual ~Modify();
|
||||||
virtual int run(const std::string& path);
|
virtual int run(const std::string& path);
|
||||||
typedef std::unique_ptr<Modify> UniquePtr;
|
using UniquePtr = std::unique_ptr<Modify>;
|
||||||
UniquePtr clone() const;
|
UniquePtr clone() const;
|
||||||
Modify() {}
|
Modify() {}
|
||||||
//! Apply modification commands to the \em pImage, return 0 if successful.
|
//! Apply modification commands to the \em pImage, return 0 if successful.
|
||||||
@ -407,7 +407,7 @@ namespace Action {
|
|||||||
public:
|
public:
|
||||||
virtual ~FixIso();
|
virtual ~FixIso();
|
||||||
virtual int run(const std::string& path);
|
virtual int run(const std::string& path);
|
||||||
typedef std::unique_ptr<FixIso> UniquePtr;
|
using UniquePtr = std::unique_ptr<FixIso>;
|
||||||
UniquePtr clone() const;
|
UniquePtr clone() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -425,7 +425,7 @@ namespace Action {
|
|||||||
public:
|
public:
|
||||||
virtual ~FixCom();
|
virtual ~FixCom();
|
||||||
virtual int run(const std::string& path);
|
virtual int run(const std::string& path);
|
||||||
typedef std::unique_ptr<FixCom> UniquePtr;
|
using UniquePtr = std::unique_ptr<FixCom>;
|
||||||
UniquePtr clone() const;
|
UniquePtr clone() const;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|||||||
@ -69,7 +69,7 @@
|
|||||||
|
|
||||||
#if defined(__MINGW__) || (defined(WIN32) && !defined(__CYGWIN__))
|
#if defined(__MINGW__) || (defined(WIN32) && !defined(__CYGWIN__))
|
||||||
// Windows doesn't provide nlink_t
|
// Windows doesn't provide nlink_t
|
||||||
typedef short nlink_t;
|
using nlink_t = short;
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
#endif
|
#endif
|
||||||
@ -319,7 +319,7 @@ namespace Exiv2 {
|
|||||||
|
|
||||||
HANDLE hFd = (HANDLE)_get_osfhandle(fileno(fp_));
|
HANDLE hFd = (HANDLE)_get_osfhandle(fileno(fp_));
|
||||||
if (hFd != INVALID_HANDLE_VALUE) {
|
if (hFd != INVALID_HANDLE_VALUE) {
|
||||||
typedef BOOL (WINAPI * GetFileInformationByHandle_t)(HANDLE, LPBY_HANDLE_FILE_INFORMATION);
|
using GetFileInformationByHandle_t = BOOL(WINAPI*)(HANDLE, LPBY_HANDLE_FILE_INFORMATION);
|
||||||
HMODULE hKernel = ::GetModuleHandleA("kernel32.dll");
|
HMODULE hKernel = ::GetModuleHandleA("kernel32.dll");
|
||||||
if (hKernel) {
|
if (hKernel) {
|
||||||
GetFileInformationByHandle_t pfcn_GetFileInformationByHandle = (GetFileInformationByHandle_t)GetProcAddress(hKernel, "GetFileInformationByHandle");
|
GetFileInformationByHandle_t pfcn_GetFileInformationByHandle = (GetFileInformationByHandle_t)GetProcAddress(hKernel, "GetFileInformationByHandle");
|
||||||
@ -697,7 +697,7 @@ namespace Exiv2 {
|
|||||||
// that file has been opened with FILE_SHARE_DELETE by another process,
|
// that file has been opened with FILE_SHARE_DELETE by another process,
|
||||||
// like a virus scanner or disk indexer
|
// like a virus scanner or disk indexer
|
||||||
// (see also http://stackoverflow.com/a/11023068)
|
// (see also http://stackoverflow.com/a/11023068)
|
||||||
typedef BOOL (WINAPI * ReplaceFileW_t)(LPCWSTR, LPCWSTR, LPCWSTR, DWORD, LPVOID, LPVOID);
|
using ReplaceFileW_t = BOOL(WINAPI*)(LPCWSTR, LPCWSTR, LPCWSTR, DWORD, LPVOID, LPVOID);
|
||||||
HMODULE hKernel = ::GetModuleHandleA("kernel32.dll");
|
HMODULE hKernel = ::GetModuleHandleA("kernel32.dll");
|
||||||
if (hKernel) {
|
if (hKernel) {
|
||||||
ReplaceFileW_t pfcn_ReplaceFileW = (ReplaceFileW_t)GetProcAddress(hKernel, "ReplaceFileW");
|
ReplaceFileW_t pfcn_ReplaceFileW = (ReplaceFileW_t)GetProcAddress(hKernel, "ReplaceFileW");
|
||||||
@ -760,7 +760,7 @@ namespace Exiv2 {
|
|||||||
// that file has been opened with FILE_SHARE_DELETE by another process,
|
// that file has been opened with FILE_SHARE_DELETE by another process,
|
||||||
// like a virus scanner or disk indexer
|
// like a virus scanner or disk indexer
|
||||||
// (see also http://stackoverflow.com/a/11023068)
|
// (see also http://stackoverflow.com/a/11023068)
|
||||||
typedef BOOL (WINAPI * ReplaceFileA_t)(LPCSTR, LPCSTR, LPCSTR, DWORD, LPVOID, LPVOID);
|
using ReplaceFileA_t = BOOL(WINAPI*)(LPCSTR, LPCSTR, LPCSTR, DWORD, LPVOID, LPVOID);
|
||||||
HMODULE hKernel = ::GetModuleHandleA("kernel32.dll");
|
HMODULE hKernel = ::GetModuleHandleA("kernel32.dll");
|
||||||
if (hKernel) {
|
if (hKernel) {
|
||||||
ReplaceFileA_t pfcn_ReplaceFileA = (ReplaceFileA_t)GetProcAddress(hKernel, "ReplaceFileA");
|
ReplaceFileA_t pfcn_ReplaceFileA = (ReplaceFileA_t)GetProcAddress(hKernel, "ReplaceFileA");
|
||||||
|
|||||||
@ -104,7 +104,7 @@ namespace Exiv2 {
|
|||||||
These functions have access to both the source and destination metadata
|
These functions have access to both the source and destination metadata
|
||||||
containers and store the result directly in the destination container.
|
containers and store the result directly in the destination container.
|
||||||
*/
|
*/
|
||||||
typedef void (Converter::*ConvertFct)(const char* from, const char* to);
|
using ConvertFct = void (Converter::*)(const char*, const char*);
|
||||||
//! Structure to define conversions between two keys.
|
//! Structure to define conversions between two keys.
|
||||||
struct Conversion {
|
struct Conversion {
|
||||||
MetadataId metadataId_; //!< Type of metadata for the first key.
|
MetadataId metadataId_; //!< Type of metadata for the first key.
|
||||||
@ -1481,7 +1481,7 @@ namespace {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef bool (*ConvFct)(std::string& str);
|
using ConvFct = bool (*)(std::string& str);
|
||||||
|
|
||||||
struct ConvFctList {
|
struct ConvFctList {
|
||||||
bool operator==(const std::pair<const char*, const char*> &fromTo) const
|
bool operator==(const std::pair<const char*, const char*> &fromTo) const
|
||||||
|
|||||||
@ -52,18 +52,13 @@ namespace Exiv2 {
|
|||||||
// type definitions
|
// type definitions
|
||||||
|
|
||||||
//! Function pointer for functions to decode Exif tags from a CRW entry
|
//! Function pointer for functions to decode Exif tags from a CRW entry
|
||||||
typedef void (*CrwDecodeFct)(const CiffComponent&,
|
using CrwDecodeFct = void (*)(const CiffComponent&, const CrwMapping*, Image&, ByteOrder);
|
||||||
const CrwMapping*,
|
|
||||||
Image&,
|
|
||||||
ByteOrder);
|
|
||||||
|
|
||||||
//! Function pointer for functions to encode CRW entries from Exif tags
|
//! Function pointer for functions to encode CRW entries from Exif tags
|
||||||
typedef void (*CrwEncodeFct)(const Image&,
|
using CrwEncodeFct = void (*)(const Image&, const CrwMapping*, CiffHeader*);
|
||||||
const CrwMapping*,
|
|
||||||
CiffHeader*);
|
|
||||||
|
|
||||||
//! Stack to hold a path of CRW directories
|
//! Stack to hold a path of CRW directories
|
||||||
typedef std::stack<CrwSubDir> CrwDirs;
|
using CrwDirs = std::stack<CrwSubDir>;
|
||||||
|
|
||||||
//! Type to identify where the data is stored in a directory
|
//! Type to identify where the data is stored in a directory
|
||||||
enum DataLocId {
|
enum DataLocId {
|
||||||
@ -84,9 +79,9 @@ namespace Exiv2 {
|
|||||||
class CiffComponent {
|
class CiffComponent {
|
||||||
public:
|
public:
|
||||||
//! CiffComponent auto_ptr type
|
//! CiffComponent auto_ptr type
|
||||||
typedef std::unique_ptr<CiffComponent> UniquePtr;
|
using UniquePtr = std::unique_ptr<CiffComponent>;
|
||||||
//! Container type to hold all metadata
|
//! Container type to hold all metadata
|
||||||
typedef std::vector<CiffComponent*> Components;
|
using Components = std::vector<CiffComponent*>;
|
||||||
|
|
||||||
//! @name Creators
|
//! @name Creators
|
||||||
//@{
|
//@{
|
||||||
@ -428,7 +423,7 @@ namespace Exiv2 {
|
|||||||
class CiffHeader {
|
class CiffHeader {
|
||||||
public:
|
public:
|
||||||
//! CiffHeader auto_ptr type
|
//! CiffHeader auto_ptr type
|
||||||
typedef std::unique_ptr<CiffHeader> UniquePtr;
|
using UniquePtr = std::unique_ptr<CiffHeader>;
|
||||||
|
|
||||||
//! @name Creators
|
//! @name Creators
|
||||||
//@{
|
//@{
|
||||||
|
|||||||
@ -80,7 +80,7 @@ namespace {
|
|||||||
class Thumbnail {
|
class Thumbnail {
|
||||||
public:
|
public:
|
||||||
//! Shortcut for a %Thumbnail auto pointer.
|
//! Shortcut for a %Thumbnail auto pointer.
|
||||||
typedef std::unique_ptr<Thumbnail> UniquePtr;
|
using UniquePtr = std::unique_ptr<Thumbnail>;
|
||||||
|
|
||||||
//! @name Creators
|
//! @name Creators
|
||||||
//@{
|
//@{
|
||||||
@ -123,7 +123,7 @@ namespace {
|
|||||||
class TiffThumbnail : public Thumbnail {
|
class TiffThumbnail : public Thumbnail {
|
||||||
public:
|
public:
|
||||||
//! Shortcut for a %TiffThumbnail auto pointer.
|
//! Shortcut for a %TiffThumbnail auto pointer.
|
||||||
typedef std::unique_ptr<TiffThumbnail> UniquePtr;
|
using UniquePtr = std::unique_ptr<TiffThumbnail>;
|
||||||
|
|
||||||
//! @name Manipulators
|
//! @name Manipulators
|
||||||
//@{
|
//@{
|
||||||
@ -147,7 +147,7 @@ namespace {
|
|||||||
class JpegThumbnail : public Thumbnail {
|
class JpegThumbnail : public Thumbnail {
|
||||||
public:
|
public:
|
||||||
//! Shortcut for a %JpegThumbnail auto pointer.
|
//! Shortcut for a %JpegThumbnail auto pointer.
|
||||||
typedef std::unique_ptr<JpegThumbnail> UniquePtr;
|
using UniquePtr = std::unique_ptr<JpegThumbnail>;
|
||||||
|
|
||||||
//! @name Manipulators
|
//! @name Manipulators
|
||||||
//@{
|
//@{
|
||||||
|
|||||||
@ -1035,7 +1035,7 @@ void Params::getStdin(Exiv2::DataBuf& buf)
|
|||||||
|
|
||||||
} // Params::getStdin()
|
} // Params::getStdin()
|
||||||
|
|
||||||
typedef std::map<std::string,std::string> long_t;
|
using long_t = std::map<std::string, std::string>;
|
||||||
|
|
||||||
int Params::getopt(int argc, char* const Argv[])
|
int Params::getopt(int argc, char* const Argv[])
|
||||||
{
|
{
|
||||||
|
|||||||
@ -93,7 +93,7 @@ struct ModifyCmd {
|
|||||||
std::string value_; //!< Data
|
std::string value_; //!< Data
|
||||||
};
|
};
|
||||||
//! Container for modification commands
|
//! Container for modification commands
|
||||||
typedef std::vector<ModifyCmd> ModifyCmds;
|
using ModifyCmds = std::vector<ModifyCmd>;
|
||||||
//! Structure to link command identifiers to strings
|
//! Structure to link command identifiers to strings
|
||||||
struct CmdIdAndString {
|
struct CmdIdAndString {
|
||||||
CmdId cmdId_; //!< Commands identifier
|
CmdId cmdId_; //!< Commands identifier
|
||||||
@ -141,17 +141,17 @@ private:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
//! Container for command files
|
//! Container for command files
|
||||||
typedef std::vector<std::string> CmdFiles;
|
using CmdFiles = std::vector<std::string>;
|
||||||
//! Container for commands from the command line
|
//! Container for commands from the command line
|
||||||
typedef std::vector<std::string> CmdLines;
|
using CmdLines = std::vector<std::string>;
|
||||||
//! Container to store filenames.
|
//! Container to store filenames.
|
||||||
typedef std::vector<std::string> Files;
|
using Files = std::vector<std::string>;
|
||||||
//! Container for preview image numbers
|
//! Container for preview image numbers
|
||||||
typedef std::set<int> PreviewNumbers;
|
using PreviewNumbers = std::set<int>;
|
||||||
//! Container for greps
|
//! Container for greps
|
||||||
typedef exv_grep_keys_t Greps;
|
using Greps = exv_grep_keys_t;
|
||||||
//! Container for keys
|
//! Container for keys
|
||||||
typedef std::vector<std::string> Keys;
|
using Keys = std::vector<std::string>;
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@brief Controls all access to the global Params instance.
|
@brief Controls all access to the global Params instance.
|
||||||
|
|||||||
@ -362,7 +362,7 @@ namespace Exiv2 {
|
|||||||
{
|
{
|
||||||
Uri result;
|
Uri result;
|
||||||
|
|
||||||
typedef std::string::const_iterator iterator_t;
|
using iterator_t = std::string::const_iterator;
|
||||||
|
|
||||||
if ( !uri.length() ) return result;
|
if ( !uri.length() ) return result;
|
||||||
|
|
||||||
|
|||||||
@ -76,7 +76,7 @@
|
|||||||
|
|
||||||
#define fopen_S(f,n,o) f=fopen(n,o)
|
#define fopen_S(f,n,o) f=fopen(n,o)
|
||||||
#define WINAPI
|
#define WINAPI
|
||||||
typedef unsigned long DWORD ;
|
using DWORD = unsigned long;
|
||||||
|
|
||||||
#define SOCKET_ERROR -1
|
#define SOCKET_ERROR -1
|
||||||
#define WSAEWOULDBLOCK EINPROGRESS
|
#define WSAEWOULDBLOCK EINPROGRESS
|
||||||
|
|||||||
@ -51,7 +51,7 @@ namespace Exiv2 {
|
|||||||
// class definitions
|
// class definitions
|
||||||
|
|
||||||
//! Type for a pointer to a function creating a makernote (image)
|
//! Type for a pointer to a function creating a makernote (image)
|
||||||
typedef TiffComponent* (*NewMnFct)(uint16_t tag,
|
using NewMnFct = TiffComponent* (*)(uint16_t tag,
|
||||||
IfdId group,
|
IfdId group,
|
||||||
IfdId mnGroup,
|
IfdId mnGroup,
|
||||||
const byte* pData,
|
const byte* pData,
|
||||||
@ -59,7 +59,7 @@ namespace Exiv2 {
|
|||||||
ByteOrder byteOrder);
|
ByteOrder byteOrder);
|
||||||
|
|
||||||
//! Type for a pointer to a function creating a makernote (group)
|
//! Type for a pointer to a function creating a makernote (group)
|
||||||
typedef TiffComponent* (*NewMnFct2)(uint16_t tag,
|
using NewMnFct2 = TiffComponent* (*)(uint16_t tag,
|
||||||
IfdId group,
|
IfdId group,
|
||||||
IfdId mnGroup);
|
IfdId mnGroup);
|
||||||
|
|
||||||
|
|||||||
@ -89,7 +89,7 @@ namespace {
|
|||||||
virtual ~Loader() = default;
|
virtual ~Loader() = default;
|
||||||
|
|
||||||
//! Loader auto pointer
|
//! Loader auto pointer
|
||||||
typedef std::unique_ptr<Loader> UniquePtr;
|
using UniquePtr = std::unique_ptr<Loader>;
|
||||||
|
|
||||||
//! Create a Loader subclass for requested id
|
//! Create a Loader subclass for requested id
|
||||||
static UniquePtr create(PreviewId id, const Image &image);
|
static UniquePtr create(PreviewId id, const Image &image);
|
||||||
@ -114,7 +114,7 @@ namespace {
|
|||||||
Loader(PreviewId id, const Image &image);
|
Loader(PreviewId id, const Image &image);
|
||||||
|
|
||||||
//! Functions that creates a loader from given parameters
|
//! Functions that creates a loader from given parameters
|
||||||
typedef UniquePtr (*CreateFunc)(PreviewId id, const Image &image, int parIdx);
|
using CreateFunc = UniquePtr (*)(PreviewId, const Image &, int);
|
||||||
|
|
||||||
//! Structure to list possible loaders
|
//! Structure to list possible loaders
|
||||||
struct LoaderList {
|
struct LoaderList {
|
||||||
|
|||||||
@ -90,7 +90,7 @@ namespace Safe
|
|||||||
template <class T>
|
template <class T>
|
||||||
struct enable_if<true, T>
|
struct enable_if<true, T>
|
||||||
{
|
{
|
||||||
typedef T type;
|
using type = T;
|
||||||
};
|
};
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|||||||
@ -45,7 +45,7 @@ namespace Exiv2 {
|
|||||||
// class definitions
|
// class definitions
|
||||||
|
|
||||||
//! TIFF value type.
|
//! TIFF value type.
|
||||||
typedef uint16_t TiffType;
|
using TiffType = uint16_t;
|
||||||
|
|
||||||
const TiffType ttUnsignedByte = 1; //!< Exif BYTE type
|
const TiffType ttUnsignedByte = 1; //!< Exif BYTE type
|
||||||
const TiffType ttAsciiString = 2; //!< Exif ASCII type
|
const TiffType ttAsciiString = 2; //!< Exif ASCII type
|
||||||
@ -172,9 +172,9 @@ namespace Exiv2 {
|
|||||||
class TiffComponent {
|
class TiffComponent {
|
||||||
public:
|
public:
|
||||||
//! TiffComponent auto_ptr type
|
//! TiffComponent auto_ptr type
|
||||||
typedef std::unique_ptr<TiffComponent> UniquePtr;
|
using UniquePtr = std::unique_ptr<TiffComponent>;
|
||||||
//! Container type to hold all metadata
|
//! Container type to hold all metadata
|
||||||
typedef std::vector<TiffComponent*> Components;
|
using Components = std::vector<TiffComponent*>;
|
||||||
|
|
||||||
//! @name Creators
|
//! @name Creators
|
||||||
//@{
|
//@{
|
||||||
@ -801,7 +801,7 @@ namespace Exiv2 {
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
//! Pointers to the image data (strips) and their sizes.
|
//! Pointers to the image data (strips) and their sizes.
|
||||||
typedef std::vector<std::pair<const byte*, uint32_t> > Strips;
|
using Strips = std::vector<std::pair<const byte*, uint32_t>>;
|
||||||
|
|
||||||
// DATA
|
// DATA
|
||||||
Strips strips_; //!< Image strips data (never alloc'd) and sizes
|
Strips strips_; //!< Image strips data (never alloc'd) and sizes
|
||||||
@ -1054,7 +1054,7 @@ namespace Exiv2 {
|
|||||||
//@}
|
//@}
|
||||||
|
|
||||||
//! A collection of TIFF directories (IFDs)
|
//! A collection of TIFF directories (IFDs)
|
||||||
typedef std::vector<TiffDirectory*> Ifds;
|
using Ifds = std::vector<TiffDirectory*>;
|
||||||
|
|
||||||
// DATA
|
// DATA
|
||||||
IfdId newGroup_; //!< Start of the range of group numbers for the sub-IFDs
|
IfdId newGroup_; //!< Start of the range of group numbers for the sub-IFDs
|
||||||
@ -1305,10 +1305,10 @@ namespace Exiv2 {
|
|||||||
@brief Function pointer type for a function to determine which cfg + def
|
@brief Function pointer type for a function to determine which cfg + def
|
||||||
of a corresponding array set to use.
|
of a corresponding array set to use.
|
||||||
*/
|
*/
|
||||||
typedef int (*CfgSelFct)(uint16_t, const byte*, uint32_t, TiffComponent* const);
|
using CfgSelFct = int (*)(uint16_t, const byte*, uint32_t, TiffComponent* const);
|
||||||
|
|
||||||
//! Function pointer type for a crypt function used for binary arrays.
|
//! Function pointer type for a crypt function used for binary arrays.
|
||||||
typedef DataBuf (*CryptFct)(uint16_t, const byte*, uint32_t, TiffComponent* const);
|
using CryptFct = DataBuf (*)(uint16_t, const byte*, uint32_t, TiffComponent* const);
|
||||||
|
|
||||||
//! Defines one tag in a binary array
|
//! Defines one tag in a binary array
|
||||||
struct ArrayDef {
|
struct ArrayDef {
|
||||||
|
|||||||
@ -73,39 +73,32 @@ namespace Exiv2 {
|
|||||||
@brief Function pointer type for a TiffDecoder member function
|
@brief Function pointer type for a TiffDecoder member function
|
||||||
to decode a TIFF component.
|
to decode a TIFF component.
|
||||||
*/
|
*/
|
||||||
typedef void (TiffDecoder::*DecoderFct)(const TiffEntryBase*);
|
using DecoderFct = void (TiffDecoder::*)(const TiffEntryBase*);
|
||||||
/*!
|
/*!
|
||||||
@brief Function pointer type for a TiffDecoder member function
|
@brief Function pointer type for a TiffDecoder member function
|
||||||
to decode a TIFF component.
|
to decode a TIFF component.
|
||||||
*/
|
*/
|
||||||
typedef void (TiffEncoder::*EncoderFct)(TiffEntryBase*, const Exifdatum*);
|
using EncoderFct = void (TiffEncoder::*)(TiffEntryBase*, const Exifdatum*);
|
||||||
/*!
|
/*!
|
||||||
@brief Type for a function pointer for a function to decode a TIFF component.
|
@brief Type for a function pointer for a function to decode a TIFF component.
|
||||||
*/
|
*/
|
||||||
typedef DecoderFct (*FindDecoderFct)(const std::string& make,
|
using FindDecoderFct = DecoderFct (*)(const std::string& make, uint32_t extendedTag, IfdId group);
|
||||||
uint32_t extendedTag,
|
|
||||||
IfdId group);
|
|
||||||
/*!
|
/*!
|
||||||
@brief Type for a function pointer for a function to encode a TIFF component.
|
@brief Type for a function pointer for a function to encode a TIFF component.
|
||||||
*/
|
*/
|
||||||
typedef EncoderFct (*FindEncoderFct)(
|
using FindEncoderFct = EncoderFct (*)(const std::string& make, uint32_t extendedTag, IfdId group);
|
||||||
const std::string& make,
|
|
||||||
uint32_t extendedTag,
|
|
||||||
IfdId group
|
|
||||||
);
|
|
||||||
/*!
|
/*!
|
||||||
@brief Type for a function pointer for a function to create a TIFF component.
|
@brief Type for a function pointer for a function to create a TIFF component.
|
||||||
Use TiffComponent::UniquePtr, it is not used in this declaration only
|
Use TiffComponent::UniquePtr, it is not used in this declaration only
|
||||||
to reduce dependencies.
|
to reduce dependencies.
|
||||||
*/
|
*/
|
||||||
typedef std::unique_ptr<TiffComponent> (*NewTiffCompFct)(uint16_t tag, IfdId group);
|
using NewTiffCompFct = std::unique_ptr<TiffComponent> (*)(uint16_t tag, IfdId group);
|
||||||
|
|
||||||
//! Stack to hold a path from the TIFF root element to a TIFF entry
|
//! Stack to hold a path from the TIFF root element to a TIFF entry
|
||||||
typedef std::stack<TiffPathItem> TiffPath;
|
using TiffPath = std::stack<TiffPathItem>;
|
||||||
|
|
||||||
//! Type for a list of primary image groups
|
//! Type for a list of primary image groups
|
||||||
typedef std::vector<IfdId> PrimaryGroups;
|
using PrimaryGroups = std::vector<IfdId>;
|
||||||
|
|
||||||
}} // namespace Internal, Exiv2
|
}} // namespace Internal, Exiv2
|
||||||
|
|
||||||
#endif // #ifndef TIFFFWD_INT_HPP_
|
#endif // #ifndef TIFFFWD_INT_HPP_
|
||||||
|
|||||||
@ -457,7 +457,7 @@ namespace Exiv2 {
|
|||||||
ByteOrder byteOrder_; //!< Byte order to use to encode target address
|
ByteOrder byteOrder_; //!< Byte order to use to encode target address
|
||||||
};
|
};
|
||||||
//! Type of the list containing an identifier and an address pair.
|
//! Type of the list containing an identifier and an address pair.
|
||||||
typedef std::map<OffsetId, OffsetData> OffsetList;
|
using OffsetList = std::map<OffsetId, OffsetData>;
|
||||||
|
|
||||||
// DATA
|
// DATA
|
||||||
OffsetList offsetList_; //!< List of the offsets to replace
|
OffsetList offsetList_; //!< List of the offsets to replace
|
||||||
|
|||||||
@ -706,9 +706,9 @@ namespace Exiv2 {
|
|||||||
//@}
|
//@}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef std::map<const byte*, IfdId> DirList;
|
using DirList = std::map<const byte*, IfdId>;
|
||||||
typedef std::map<uint16_t, int> IdxSeq;
|
using IdxSeq = std::map<uint16_t, int>;
|
||||||
typedef std::vector<TiffComponent*> PostList;
|
using PostList = std::vector<TiffComponent*>;
|
||||||
|
|
||||||
// DATA
|
// DATA
|
||||||
const byte* pData_; //!< Pointer to the memory buffer
|
const byte* pData_; //!< Pointer to the memory buffer
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user