mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-06 17:41:04 +00:00
Various random code cleanups
This commit is contained in:
parent
358658fa34
commit
7892541383
73 changed files with 216 additions and 285 deletions
|
@ -362,8 +362,7 @@ void GUITable::setTable(const TableOptions &options,
|
|||
// Find content_index. Image indices are defined in
|
||||
// column options so check active_image_indices.
|
||||
s32 image_index = stoi(content[i * colcount + j]);
|
||||
std::map<s32, s32>::iterator image_iter =
|
||||
active_image_indices.find(image_index);
|
||||
auto image_iter =active_image_indices.find(image_index);
|
||||
if (image_iter != active_image_indices.end())
|
||||
row->content_index = image_iter->second;
|
||||
|
||||
|
@ -965,7 +964,7 @@ bool GUITable::OnEvent(const SEvent &event)
|
|||
|
||||
s32 GUITable::allocString(const std::string &text)
|
||||
{
|
||||
std::map<std::string, s32>::iterator it = m_alloc_strings.find(text);
|
||||
auto it = m_alloc_strings.find(text);
|
||||
if (it == m_alloc_strings.end()) {
|
||||
s32 id = m_strings.size();
|
||||
std::wstring wtext = utf8_to_wide(text);
|
||||
|
@ -979,7 +978,7 @@ s32 GUITable::allocString(const std::string &text)
|
|||
|
||||
s32 GUITable::allocImage(const std::string &imagename)
|
||||
{
|
||||
std::map<std::string, s32>::iterator it = m_alloc_images.find(imagename);
|
||||
auto it = m_alloc_images.find(imagename);
|
||||
if (it == m_alloc_images.end()) {
|
||||
s32 id = m_images.size();
|
||||
m_images.push_back(m_tsrc->getTexture(imagename));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue