mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-25 10:20:18 -06:00
[kvp-frame.cpp] expose iterator, skip inexistent frame
This commit is contained in:
parent
6a668df168
commit
0c4d438a0e
@ -78,6 +78,8 @@ KvpFrame::get_child_frame_or_nullptr (Path const & path) noexcept
|
||||
if (map_iter == m_valuemap.end ())
|
||||
return nullptr;
|
||||
auto child = map_iter->second->get <KvpFrame *> ();
|
||||
if (!child)
|
||||
return nullptr;
|
||||
Path send;
|
||||
std::copy (path.begin () + 1, path.end (), std::back_inserter (send));
|
||||
return child->get_child_frame_or_nullptr (send);
|
||||
|
@ -226,6 +226,9 @@ struct KvpFrameImpl
|
||||
bool empty() const noexcept { return m_valuemap.empty(); }
|
||||
friend int compare(const KvpFrameImpl&, const KvpFrameImpl&) noexcept;
|
||||
|
||||
map_type::iterator begin() { return m_valuemap.begin(); }
|
||||
map_type::iterator end() { return m_valuemap.end(); }
|
||||
|
||||
private:
|
||||
map_type m_valuemap;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user