mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2025-02-26 08:22:31 +00:00
Made a member function const. Added a function for looking up the property corresponding to the change's name.
This commit is contained in:
parent
7b43a288ff
commit
724316e5cb
@ -27,7 +27,9 @@ change_c::validate() {
|
||||
}
|
||||
|
||||
void
|
||||
change_c::dump_info() {
|
||||
change_c::dump_info()
|
||||
const
|
||||
{
|
||||
mxinfo(boost::format(" change:\n"
|
||||
" type: %1%\n"
|
||||
" name: %2%\n"
|
||||
@ -36,3 +38,15 @@ change_c::dump_info() {
|
||||
% m_name
|
||||
% m_value);
|
||||
}
|
||||
|
||||
bool
|
||||
change_c::lookup_property(std::vector<property_element_c> &table) {
|
||||
std::vector<property_element_c>::iterator property_it;
|
||||
mxforeach(property_it, table)
|
||||
if (property_it->m_name == m_name) {
|
||||
m_property = *property_it;
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "common/smart_pointers.h"
|
||||
#include "propedit/property_element.h"
|
||||
|
||||
class change_c {
|
||||
public:
|
||||
@ -28,11 +29,15 @@ public:
|
||||
change_type_e m_type;
|
||||
std::string m_name, m_value;
|
||||
|
||||
property_element_c m_property;
|
||||
|
||||
public:
|
||||
change_c(change_type_e type, const std::string &name, const std::string &value);
|
||||
|
||||
void validate();
|
||||
void dump_info();
|
||||
void dump_info() const;
|
||||
|
||||
bool lookup_property(std::vector<property_element_c> &table);
|
||||
};
|
||||
typedef counted_ptr<change_c> change_cptr;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user