summaryrefslogtreecommitdiff
path: root/src/guiFormSpecMenu.cpp
diff options
context:
space:
mode:
authorShadowNinja <shadowninja@minetest.net>2015-10-14 01:26:03 -0400
committerkwolekr <kwolekr@minetest.net>2015-10-14 01:36:48 -0400
commit96cc5b34fe0151d2a1498eaaafb205757db346c4 (patch)
treee612a2d78086427cc5f555b82c597dcf9dd13b74 /src/guiFormSpecMenu.cpp
parent2139d7d45fb1a8ed250ad96c9975c581f02f72a9 (diff)
downloadminetest-96cc5b34fe0151d2a1498eaaafb205757db346c4.tar.gz
minetest-96cc5b34fe0151d2a1498eaaafb205757db346c4.tar.bz2
minetest-96cc5b34fe0151d2a1498eaaafb205757db346c4.zip
Use warningstream for log messages with WARNING
Remove DTIME macro and its uses, too
Diffstat (limited to 'src/guiFormSpecMenu.cpp')
-rw-r--r--src/guiFormSpecMenu.cpp35
1 files changed, 17 insertions, 18 deletions
diff --git a/src/guiFormSpecMenu.cpp b/src/guiFormSpecMenu.cpp
index dca7618b9..c5edb967e 100644
--- a/src/guiFormSpecMenu.cpp
+++ b/src/guiFormSpecMenu.cpp
@@ -300,7 +300,7 @@ void GUIFormSpecMenu::parseSize(parserData* data,std::string element)
void GUIFormSpecMenu::parseList(parserData* data,std::string element)
{
if (m_gamedef == 0) {
- errorstream<<"WARNING: invalid use of 'list' with m_gamedef==0"<<std::endl;
+ warningstream<<"invalid use of 'list' with m_gamedef==0"<<std::endl;
return;
}
@@ -345,7 +345,7 @@ void GUIFormSpecMenu::parseList(parserData* data,std::string element)
}
if(!data->explicit_size)
- errorstream<<"WARNING: invalid use of list without a size[] element"<<std::endl;
+ warningstream<<"invalid use of list without a size[] element"<<std::endl;
m_inventorylists.push_back(ListDrawSpec(loc, listname, pos, geom, start_i));
return;
}
@@ -525,7 +525,7 @@ void GUIFormSpecMenu::parseImage(parserData* data,std::string element)
geom.Y = stof(v_geom[1]) * (float)imgsize.Y;
if(!data->explicit_size)
- errorstream<<"WARNING: invalid use of image without a size[] element"<<std::endl;
+ warningstream<<"invalid use of image without a size[] element"<<std::endl;
m_images.push_back(ImageDrawSpec(name, pos, geom));
return;
}
@@ -541,7 +541,7 @@ void GUIFormSpecMenu::parseImage(parserData* data,std::string element)
pos.Y += stof(v_pos[1]) * (float) spacing.Y;
if(!data->explicit_size)
- errorstream<<"WARNING: invalid use of image without a size[] element"<<std::endl;
+ warningstream<<"invalid use of image without a size[] element"<<std::endl;
m_images.push_back(ImageDrawSpec(name, pos));
return;
}
@@ -571,7 +571,7 @@ void GUIFormSpecMenu::parseItemImage(parserData* data,std::string element)
geom.Y = stof(v_geom[1]) * (float)imgsize.Y;
if(!data->explicit_size)
- errorstream<<"WARNING: invalid use of item_image without a size[] element"<<std::endl;
+ warningstream<<"invalid use of item_image without a size[] element"<<std::endl;
m_itemimages.push_back(ImageDrawSpec(name, pos, geom));
return;
}
@@ -607,7 +607,7 @@ void GUIFormSpecMenu::parseButton(parserData* data,std::string element,
pos.X + geom.X, pos.Y + m_btn_height);
if(!data->explicit_size)
- errorstream<<"WARNING: invalid use of button without a size[] element"<<std::endl;
+ warningstream<<"invalid use of button without a size[] element"<<std::endl;
label = unescape_string(label);
@@ -666,7 +666,7 @@ void GUIFormSpecMenu::parseBackground(parserData* data,std::string element)
}
if(!data->explicit_size)
- errorstream<<"WARNING: invalid use of background without a size[] element"<<std::endl;
+ warningstream<<"invalid use of background without a size[] element"<<std::endl;
m_backgrounds.push_back(ImageDrawSpec(name, pos, geom));
return;
}
@@ -982,7 +982,7 @@ void GUIFormSpecMenu::parseSimpleField(parserData* data,
core::rect<s32> rect;
if(data->explicit_size)
- errorstream<<"WARNING: invalid use of unpositioned \"field\" in inventory"<<std::endl;
+ warningstream<<"invalid use of unpositioned \"field\" in inventory"<<std::endl;
v2s32 pos = padding + AbsoluteRect.UpperLeftCorner;
pos.Y = ((m_fields.size()+2)*60);
@@ -1088,7 +1088,7 @@ void GUIFormSpecMenu::parseTextArea(parserData* data,
core::rect<s32> rect = core::rect<s32>(pos.X, pos.Y, pos.X+geom.X, pos.Y+geom.Y);
if(!data->explicit_size)
- errorstream<<"WARNING: invalid use of positioned "<<type<<" without a size[] element"<<std::endl;
+ warningstream<<"invalid use of positioned "<<type<<" without a size[] element"<<std::endl;
if(m_form_src)
default_val = m_form_src->resolveText(default_val);
@@ -1195,7 +1195,7 @@ void GUIFormSpecMenu::parseLabel(parserData* data,std::string element)
pos.Y += (stof(v_pos[1]) + 7.0/30.0) * (float)spacing.Y;
if(!data->explicit_size)
- errorstream<<"WARNING: invalid use of label without a size[] element"<<std::endl;
+ warningstream<<"invalid use of label without a size[] element"<<std::endl;
text = unescape_string(text);
std::vector<std::string> lines = split(text, '\n');
@@ -1260,7 +1260,7 @@ void GUIFormSpecMenu::parseVertLabel(parserData* data,std::string element)
//actually text.length() would be correct but adding +1 avoids to break all mods
if(!data->explicit_size)
- errorstream<<"WARNING: invalid use of label without a size[] element"<<std::endl;
+ warningstream<<"invalid use of label without a size[] element"<<std::endl;
std::wstring label = L"";
@@ -1326,7 +1326,7 @@ void GUIFormSpecMenu::parseImageButton(parserData* data,std::string element,
core::rect<s32> rect = core::rect<s32>(pos.X, pos.Y, pos.X+geom.X, pos.Y+geom.Y);
if(!data->explicit_size)
- errorstream<<"WARNING: invalid use of image_button without a size[] element"<<std::endl;
+ warningstream<<"invalid use of image_button without a size[] element"<<std::endl;
image_name = unescape_string(image_name);
pressed_image_name = unescape_string(pressed_image_name);
@@ -1449,9 +1449,8 @@ void GUIFormSpecMenu::parseItemImageButton(parserData* data,std::string element)
{
if (m_gamedef == 0) {
- errorstream <<
- "WARNING: invalid use of item_image_button with m_gamedef==0"
- << std::endl;
+ warningstream << "invalid use of item_image_button with m_gamedef==0"
+ << std::endl;
return;
}
@@ -1479,7 +1478,7 @@ void GUIFormSpecMenu::parseItemImageButton(parserData* data,std::string element)
core::rect<s32> rect = core::rect<s32>(pos.X, pos.Y, pos.X+geom.X, pos.Y+geom.Y);
if(!data->explicit_size)
- errorstream<<"WARNING: invalid use of item_image_button without a size[] element"<<std::endl;
+ warningstream<<"invalid use of item_image_button without a size[] element"<<std::endl;
IItemDefManager *idef = m_gamedef->idef();
ItemStack item;
@@ -2158,7 +2157,7 @@ void GUIFormSpecMenu::drawList(const ListDrawSpec &s, int phase)
Inventory *inv = m_invmgr->getInventory(s.inventoryloc);
if(!inv){
- infostream<<"GUIFormSpecMenu::drawList(): WARNING: "
+ warningstream<<"GUIFormSpecMenu::drawList(): "
<<"The inventory location "
<<"\""<<s.inventoryloc.dump()<<"\" doesn't exist"
<<std::endl;
@@ -2166,7 +2165,7 @@ void GUIFormSpecMenu::drawList(const ListDrawSpec &s, int phase)
}
InventoryList *ilist = inv->getList(s.listname);
if(!ilist){
- infostream<<"GUIFormSpecMenu::drawList(): WARNING: "
+ warningstream<<"GUIFormSpecMenu::drawList(): "
<<"The inventory list \""<<s.listname<<"\" @ \""
<<s.inventoryloc.dump()<<"\" doesn't exist"
<<std::endl;