refactor
This commit is contained in:
		| @@ -99,7 +99,7 @@ auto sia_provider::get_directory_item_count(const std::string &api_path) const | |||||||
|  |  | ||||||
|     std::uint64_t item_count{}; |     std::uint64_t item_count{}; | ||||||
|     if (object_list.contains("entries")) { |     if (object_list.contains("entries")) { | ||||||
|       for (auto &&entry : object_list.at("entries")) { |       for (const auto &entry : object_list.at("entries")) { | ||||||
|         try { |         try { | ||||||
|           auto name = entry.at("name").get<std::string>(); |           auto name = entry.at("name").get<std::string>(); | ||||||
|           auto entry_api_path = utils::path::create_api_path(name); |           auto entry_api_path = utils::path::create_api_path(name); | ||||||
| @@ -136,7 +136,7 @@ auto sia_provider::get_directory_items_impl(const std::string &api_path, | |||||||
|   } |   } | ||||||
|  |  | ||||||
|   if (object_list.contains("entries")) { |   if (object_list.contains("entries")) { | ||||||
|     for (auto &&entry : object_list.at("entries")) { |     for (const auto &entry : object_list.at("entries")) { | ||||||
|       try { |       try { | ||||||
|         auto name = entry.at("name").get<std::string>(); |         auto name = entry.at("name").get<std::string>(); | ||||||
|         auto entry_api_path = utils::path::create_api_path(name); |         auto entry_api_path = utils::path::create_api_path(name); | ||||||
| @@ -227,7 +227,7 @@ auto sia_provider::get_file_list(api_file_list &list, | |||||||
|       } |       } | ||||||
|  |  | ||||||
|       if (object_list.contains("entries")) { |       if (object_list.contains("entries")) { | ||||||
|         for (auto &&entry : object_list.at("entries")) { |         for (const auto &entry : object_list.at("entries")) { | ||||||
|           auto name = entry.at("name").get<std::string>(); |           auto name = entry.at("name").get<std::string>(); | ||||||
|           auto entry_api_path = utils::path::create_api_path(name); |           auto entry_api_path = utils::path::create_api_path(name); | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user