remove exv_grep_keys_t type alias
This commit is contained in:
parent
2ca56ecbd0
commit
7251a96da6
@ -21,12 +21,13 @@
|
||||
#include <QCoreApplication>
|
||||
#include <exiv2/exiv2.hpp>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QCoreApplication a(argc, argv);
|
||||
|
||||
exv_grep_keys_t keys;
|
||||
std::vector<std::regex> keys;
|
||||
Exiv2::dumpLibraryInfo(std::cout,keys);
|
||||
|
||||
return 0;
|
||||
|
||||
@ -28,8 +28,6 @@
|
||||
// + standard includes
|
||||
#include <vector>
|
||||
#include <regex>
|
||||
using exv_grep_keys_t = std::vector<std::regex>;
|
||||
|
||||
|
||||
/*!
|
||||
@brief Make an integer version number for comparison from a major, minor and
|
||||
@ -123,7 +121,7 @@ namespace Exiv2 {
|
||||
@brief dumpLibraryInfo implements the exiv2 option --version --verbose
|
||||
used by exiv2 test suite to inspect libraries loaded at run-time
|
||||
*/
|
||||
EXIV2API void dumpLibraryInfo(std::ostream& os,const exv_grep_keys_t& keys);
|
||||
EXIV2API void dumpLibraryInfo(std::ostream& os,const std::vector<std::regex>& keys);
|
||||
} // namespace Exiv2
|
||||
|
||||
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
#include <iomanip>
|
||||
#include <set>
|
||||
#include <cassert>
|
||||
#include <regex>
|
||||
|
||||
// https://github.com/Exiv2/exiv2/issues/468
|
||||
#if defined(EXV_UNICODE_PATH) && defined(__MINGW__)
|
||||
@ -72,7 +73,7 @@ try {
|
||||
|
||||
|
||||
if ( _tstrcmp(file,_t("--version")) == 0 ) {
|
||||
exv_grep_keys_t keys;
|
||||
std::vector<std::regex> keys;
|
||||
Exiv2::dumpLibraryInfo(std::cout,keys);
|
||||
return rc;
|
||||
} else if ( _tstrcmp(file,_t("--version-test")) == 0 ) {
|
||||
|
||||
@ -149,8 +149,6 @@ public:
|
||||
using Files = std::vector<std::string>;
|
||||
//! Container for preview image numbers
|
||||
using PreviewNumbers = std::set<int>;
|
||||
//! Container for greps
|
||||
using Greps = exv_grep_keys_t;
|
||||
//! Container for keys
|
||||
using Keys = std::vector<std::string>;
|
||||
|
||||
@ -252,8 +250,8 @@ public:
|
||||
std::string suffix_; //!< File extension of the file to insert
|
||||
Files files_; //!< List of non-option arguments.
|
||||
PreviewNumbers previewNumbers_; //!< List of preview numbers
|
||||
Greps greps_; //!< List of keys to 'grep' from the metadata
|
||||
Keys keys_; //!< List of keys to match from the metadata
|
||||
std::vector<std::regex> greps_; //!< List of keys to 'grep' from the metadata
|
||||
Keys keys_; //!< List of keys to match from the metadata
|
||||
std::string charset_; //!< Charset to use for UNICODE Exif user comment
|
||||
|
||||
Exiv2::DataBuf stdinBuf; //!< DataBuf with the binary bytes from stdin
|
||||
|
||||
@ -113,7 +113,7 @@ namespace Exiv2 {
|
||||
}
|
||||
} // namespace Exiv2
|
||||
|
||||
static bool shouldOutput(const exv_grep_keys_t& greps,const char* key,const std::string& value)
|
||||
static bool shouldOutput(const std::vector<std::regex>& greps,const char* key,const std::string& value)
|
||||
{
|
||||
bool bPrint = greps.empty();
|
||||
for (auto const& g : greps) {
|
||||
@ -125,12 +125,12 @@ static bool shouldOutput(const exv_grep_keys_t& greps,const char* key,const std:
|
||||
return bPrint;
|
||||
}
|
||||
|
||||
static void output(std::ostream& os,const exv_grep_keys_t& greps,const char* name,const std::string& value)
|
||||
static void output(std::ostream& os,const std::vector<std::regex>& greps,const char* name,const std::string& value)
|
||||
{
|
||||
if ( shouldOutput(greps,name,value) ) os << name << "=" << value << std::endl;
|
||||
}
|
||||
|
||||
static void output(std::ostream& os,const exv_grep_keys_t& greps,const char* name,int value)
|
||||
static void output(std::ostream& os,const std::vector<std::regex>& greps,const char* name,int value)
|
||||
{
|
||||
std::ostringstream stringStream;
|
||||
stringStream << value;
|
||||
@ -221,7 +221,7 @@ static std::vector<std::string> getLoadedLibraries()
|
||||
return libs;
|
||||
}
|
||||
|
||||
void Exiv2::dumpLibraryInfo(std::ostream& os,const exv_grep_keys_t& keys)
|
||||
void Exiv2::dumpLibraryInfo(std::ostream& os,const std::vector<std::regex>& keys)
|
||||
{
|
||||
int bits = 8*sizeof(void*);
|
||||
#ifdef NDEBUG
|
||||
|
||||
Loading…
Reference in New Issue
Block a user