Skip to content

Commit

Permalink
Revert "Delete dead code"
Browse files Browse the repository at this point in the history
This reverts commit 1d6bac6.
  • Loading branch information
piponazo committed Feb 8, 2022
1 parent 275bcb9 commit 1f07715
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
15 changes: 15 additions & 0 deletions include/exiv2/datasets.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,21 @@ namespace Exiv2 {
*/
static const char* recordDesc(uint16_t recordId);

/*!
@brief Return the Id number of a record
@param recordName Name of a record type
@return the Id number of a Record
@throw Error if the record is not known;
*/
static uint16_t recordId(const std::string& recordName);

This comment has been minimized.

Copy link
@jim-easterbrook

jim-easterbrook Mar 9, 2022

Contributor

IptcDataSets::recordId is not implemented in datasets.cpp, giving me an undefined symbol error when SWIG includes it in the Python interface. I can ignore it if it's supposed to be internal to libexiv2, but it appears to be a useful function.


//! Return read-only list of built-in Envelope Record datasets
static const DataSet* envelopeRecordList();

//! Return read-only list of built-in Application2 Record datasets
static const DataSet* application2RecordList();

//! Print a list of all dataSets to output stream
static void dataSetList(std::ostream& os);

private:
Expand Down
10 changes: 10 additions & 0 deletions src/datasets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,16 @@ namespace Exiv2 {
0xffffffff, Exiv2::string, IptcDataSets::invalidRecord, N_("Unknown dataset"),
};

const DataSet* IptcDataSets::envelopeRecordList()
{
return envelopeRecord;
}

const DataSet* IptcDataSets::application2RecordList()
{
return application2Record;
}

// Dataset lookup lists.This is an array with pointers to one list per IIM4 Record.
// The record id is used as the index into the array.
constexpr const DataSet* IptcDataSets::records_[] = {
Expand Down

0 comments on commit 1f07715

Please sign in to comment.