Prechádzať zdrojové kódy

tools-imgui: fix warnings

Daniele Bartolini 8 rokov pred
rodič
commit
c679bd6e55

+ 3 - 4
tools-imgui/widgets/console.inl

@@ -26,8 +26,10 @@ int console_inputtext_callback(ImGuiTextEditCallbackData* data)
 		else if (ImGuiKey_DownArrow == data->EventKey)
 		{
 			if (history_pos != -1)
-				if (++history_pos >= vector::size(history))
+			{
+				if (++history_pos >= (int)vector::size(history))
 					history_pos = -1;
+			}
 		}
 
 		if (prev_history_pos != history_pos)
@@ -47,10 +49,7 @@ void console_draw(Console& console)
 
 	if (ImGui::BeginDock("Console", &console._open, ImGuiWindowFlags_NoScrollbar))
 	{
-		TCPSocket& client = console._client;
 		Vector<ConsoleLog>& items = console._console_items;
-		Vector<DynamicString>& history = console._console_history;
-		Vector<DynamicString>& commands = console._console_commands;
 
 		ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0,0));
 		static ImGuiTextFilter filter;

+ 2 - 3
tools-imgui/widgets/dock.inl

@@ -1067,7 +1067,7 @@ namespace ImGui
 			crown::File* file = fs.open("docks.config", crown::FileOpenMode::WRITE);
 
 			crown::StringStream ss(ta);
-			for (uint32_t i = 0; i < m_docks.size(); i++)
+			for (int i = 0; i < m_docks.size(); ++i)
 			{
 				Dock& dock = *m_docks[i];
 
@@ -1097,7 +1097,7 @@ namespace ImGui
 
 		void load_dock()
 		{
-			for (uint32_t i = 0; i < m_docks.size(); i++)
+			for (int i = 0; i < m_docks.size(); ++i)
 			{
 				m_docks[i]->~Dock();
 				MemFree(m_docks[i]);
@@ -1135,7 +1135,6 @@ namespace ImGui
 
 			for (; cur != end; ++cur)
 			{
-				crown::FixedString key = cur->pair.first;
 				const char* value = cur->pair.second;
 				crown::JsonObject item(ta);
 				crown::sjson::parse_object(value, item);