mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
cleanup
This commit is contained in:
parent
fe2a40b06e
commit
3498af6be9
5 changed files with 6 additions and 26 deletions
|
|
@ -619,7 +619,7 @@ static slotcallback read_slot_func(
|
|||
};
|
||||
}
|
||||
|
||||
static void readSlot(
|
||||
static void read_slot(
|
||||
InventoryView* view, UiXmlReader& reader, const xml::xmlelement& element
|
||||
) {
|
||||
int index = element.attr("index", "0").asInt();
|
||||
|
|
@ -649,7 +649,7 @@ static void readSlot(
|
|||
view->add(slot);
|
||||
}
|
||||
|
||||
static void readSlotsGrid(
|
||||
static void read_slots_grid(
|
||||
InventoryView* view,
|
||||
const UiXmlReader& reader,
|
||||
const xml::xmlelement& element
|
||||
|
|
@ -726,9 +726,9 @@ static std::shared_ptr<UINode> read_inventory(
|
|||
|
||||
for (auto& sub : element.getElements()) {
|
||||
if (sub->getTag() == "slot") {
|
||||
readSlot(view.get(), reader, *sub);
|
||||
read_slot(view.get(), reader, *sub);
|
||||
} else if (sub->getTag() == "slots-grid") {
|
||||
readSlotsGrid(view.get(), reader, *sub);
|
||||
read_slots_grid(view.get(), reader, *sub);
|
||||
}
|
||||
}
|
||||
return view;
|
||||
|
|
|
|||
|
|
@ -1,18 +0,0 @@
|
|||
#include "listutil.hpp"
|
||||
|
||||
#include <sstream>
|
||||
|
||||
#include "stringutil.hpp"
|
||||
|
||||
std::string util::to_string(const std::vector<std::string>& vec) {
|
||||
std::stringstream ss;
|
||||
ss << "[";
|
||||
for (size_t i = 0; i < vec.size(); i++) {
|
||||
ss << util::quote(vec[1]);
|
||||
if (i < vec.size() - 1) {
|
||||
ss << ", ";
|
||||
}
|
||||
}
|
||||
ss << "]";
|
||||
return ss.str();
|
||||
}
|
||||
|
|
@ -33,6 +33,4 @@ namespace util {
|
|||
a.reserve(a.size() + b.size());
|
||||
a.insert(a.end(), b.begin(), b.end());
|
||||
}
|
||||
|
||||
std::string to_string(const std::vector<std::string>& vec);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue