mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -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 ())
|
if (map_iter == m_valuemap.end ())
|
||||||
return nullptr;
|
return nullptr;
|
||||||
auto child = map_iter->second->get <KvpFrame *> ();
|
auto child = map_iter->second->get <KvpFrame *> ();
|
||||||
|
if (!child)
|
||||||
|
return nullptr;
|
||||||
Path send;
|
Path send;
|
||||||
std::copy (path.begin () + 1, path.end (), std::back_inserter (send));
|
std::copy (path.begin () + 1, path.end (), std::back_inserter (send));
|
||||||
return child->get_child_frame_or_nullptr (send);
|
return child->get_child_frame_or_nullptr (send);
|
||||||
|
@ -226,6 +226,9 @@ struct KvpFrameImpl
|
|||||||
bool empty() const noexcept { return m_valuemap.empty(); }
|
bool empty() const noexcept { return m_valuemap.empty(); }
|
||||||
friend int compare(const KvpFrameImpl&, const KvpFrameImpl&) noexcept;
|
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:
|
private:
|
||||||
map_type m_valuemap;
|
map_type m_valuemap;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user