Skip to content

Commit 5b5cc67

Browse files
committed
empty instead of size
1 parent 0a9ef89 commit 5b5cc67

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

GWToolboxdll/Windows/TargetInfoWindow.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,12 @@ void TargetInfoWindow::Draw(IDirect3DDevice9*)
406406
ImGui::TextUnformatted(current_agent_info->name.string().c_str());
407407
ImGui::PopFont();
408408
ImGui::Separator();
409-
if (current_agent_info->infobox_deets.size()) {
410-
for (const auto it : current_agent_info->infobox_deets) {
411-
ImGui::Text("%s: %s", it.first.c_str(), it.second.c_str());
409+
if (!current_agent_info->infobox_deets.empty()) {
410+
for (const auto [key, value] : current_agent_info->infobox_deets) {
411+
ImGui::Text("%s: %s", key.c_str(), value.c_str());
412412
}
413413
}
414-
if (current_agent_info->wiki_skills.size()) {
414+
if (!current_agent_info->wiki_skills.empty()) {
415415
ImGui::Text("Skills Used:");
416416
ImGui::BeginTable("skills_used_table", 2);
417417
ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, {0.f, .5f});
@@ -431,7 +431,7 @@ void TargetInfoWindow::Draw(IDirect3DDevice9*)
431431
ImGui::PopStyleVar();
432432
ImGui::EndTable();
433433
}
434-
if (current_agent_info->skills_offered.size()) {
434+
if (!current_agent_info->skills_offered.empty()) {
435435
ImGui::Text("Skills Offered:");
436436
ImGui::BeginTable("skills_offered_table", 2);
437437
ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, {0.f, .5f});
@@ -454,7 +454,7 @@ void TargetInfoWindow::Draw(IDirect3DDevice9*)
454454
ImGui::PopStyleVar();
455455
ImGui::EndTable();
456456
}
457-
if (current_agent_info->wiki_armor_ratings.size()) {
457+
if (!current_agent_info->wiki_armor_ratings.empty()) {
458458
ImGui::Text("Armor Ratings:");
459459
ImGui::BeginTable("armor_rating_table", 2);
460460
for (const auto [damage_type, armour_rating] : current_agent_info->wiki_armor_ratings) {
@@ -485,7 +485,7 @@ void TargetInfoWindow::Draw(IDirect3DDevice9*)
485485
}
486486
ImGui::EndTable();
487487
}
488-
if (current_agent_info->items_dropped.size()) {
488+
if (!current_agent_info->items_dropped.empty()) {
489489
ImGui::Text("Items Dropped:");
490490
ImGui::BeginTable("items_dropped_table", 2);
491491
ImGui::PushStyleVar(ImGuiStyleVar_ButtonTextAlign, {0.f, .5f});
@@ -502,7 +502,7 @@ void TargetInfoWindow::Draw(IDirect3DDevice9*)
502502
ImGui::PopStyleVar();
503503
ImGui::EndTable();
504504
}
505-
if (current_agent_info->notes.size()) {
505+
if (!current_agent_info->notes.empty()) {
506506
ImGui::Text("Notes:");
507507
for (const auto& note : current_agent_info->notes) {
508508
ImGui::TextWrapped("%s", note.c_str());

0 commit comments

Comments
 (0)