Initialize with = instead of braces, and drop const from local autos

Scalars get = 0, = false or = nullptr. Standard containers and strings rely on their constructors.
Other types get = {} or = value, and lists keep = {...}.
glm types are left alone until they're replaced.
This commit is contained in:
shweet committed 2026-11-22 17:27:24 -05:00
1 parent 666f65bf3a
commit 40f6b554b5
138 files changed
+1500 -1500

No files matched your search

+2 -2
View File
@@ -82,7 +82,7 @@ using namespace glm;
void tooltip_lines_draw(std::initializer_list<std::string> lines)
{
if (!ImGui::BeginTooltip()) return;
for (const auto& line : lines)
for (auto& line : lines)
ImGui::TextUnformatted(line.c_str());
ImGui::EndTooltip();
}
@@ -184,7 +184,7 @@ using namespace glm;
auto zoom_center_step = [&](int levelDelta)
{ zoom_step(zoom, pan, position_translate(zoom, pan, size * 0.5f), levelDelta); };
Actions actions{};
Actions actions = {};
actions_undo_redo_add(actions, manager, document);
actions.separator();
actions.add(ACTION_CENTER_VIEW, []() { return true; }, center);