From 05e0890d4bb991fc321ac2e11993eba37d20e077 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 1 Jan 2023 21:19:51 +0100 Subject: Cleanup: rename PKL::asset_list -> assets for consistency. --- src/pkl.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/pkl.cc') diff --git a/src/pkl.cc b/src/pkl.cc index 9ba716fb..eb8ca867 100644 --- a/src/pkl.cc +++ b/src/pkl.cc @@ -81,7 +81,7 @@ PKL::PKL (boost::filesystem::path file) _creator = pkl.string_child ("Creator"); for (auto i: pkl.node_child("AssetList")->node_children("Asset")) { - _asset_list.push_back (make_shared(i)); + _assets.push_back(make_shared(i)); } } @@ -89,7 +89,7 @@ PKL::PKL (boost::filesystem::path file) void PKL::add_asset(std::string id, boost::optional annotation_text, std::string hash, int64_t size, std::string type, std::string original_filename) { - _asset_list.push_back(make_shared(id, annotation_text, hash, size, type, original_filename)); + _assets.push_back(make_shared(id, annotation_text, hash, size, type, original_filename)); } @@ -113,7 +113,7 @@ PKL::write_xml (boost::filesystem::path file, shared_ptr pkl->add_child("Creator")->add_child_text (_creator); auto asset_list = pkl->add_child("AssetList"); - for (auto i: _asset_list) { + for (auto i: _assets) { auto asset = asset_list->add_child("Asset"); asset->add_child("Id")->add_child_text ("urn:uuid:" + i->id()); if (i->annotation_text()) { @@ -141,7 +141,7 @@ PKL::write_xml (boost::filesystem::path file, shared_ptr optional PKL::hash (string id) const { - for (auto i: _asset_list) { + for (auto i: _assets) { if (i->id() == id) { return i->hash(); } @@ -154,7 +154,7 @@ PKL::hash (string id) const optional PKL::type (string id) const { - for (auto i: _asset_list) { + for (auto i: _assets) { if (i->id() == id) { return i->type(); } @@ -167,5 +167,5 @@ PKL::type (string id) const void PKL::clear_assets() { - _asset_list.clear(); + _assets.clear(); } -- cgit v1.2.3