Skip to content

Design rational for requireing a non-empty string as window title #7434

@milasudril

Description

@milasudril

Version/Branch of Dear ImGui:

Version 1.86

Back-ends:

OpenGL + GLFW

Compiler, OS:

g++-11, Mint 21.2

Full config/build information:

No response

Details:

My Issue/Question:
Why is it illegal to use an empty or null string when creating a window?

Screenshots/Video:

imgui.cpp:5948: bool ImGui::Begin(const char*, bool*, ImGuiWindowFlags): Assertion `name != __null && name[0] != '\0'' failed.

This is annoying. I could understand the no-null requirement, but an empty string should be allowed, or do you do some stuff that require it to have an actual length, such as dividing by its length?

Minimal, Complete and Verifiable Example code:

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions