New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't insist that windows request nonzero height or width #5000
Conversation
I'm just wondering if it's worth still keeping the lower-bound check, but assert that it's >= 0 rather than just > 0? I shudder to think when negative values might be used, but I suppose it could happen so could well be worthwhile to check for them. |
Maybe throw in a comment about why 0-value dimensions are permitted as well. |
Thanks for the suggestions, done on both counts. |
Maybe I'm missing something but it looks the same as what I saw earlier. :S Edit: oh, it's an unsigned comparison - so only an upper-bound check is necessary? |
I just tested a local change to make assertion |
Eases the assertion concerning nonzero window dimensions in gui/widgets/window.cpp; it turns out that some windows do request zero dimension, and it doesn't hurt anything for them to. Fixes wesnoth#4960.
Dang, forgot |
No worries at all, I'm not that comfortable with the git command-line myself although I am learning (I did start my PC days in MS-DOS, so it's not that I dislike command-line, I'm just not used to it). It looks good to me and I basically tested it just now, so I'm happy with it. If no-one else objects or takes action on this sooner I'll merge this around this time tomorrow. |
Vultraz does need to approve UI-related changes, since he's the UI maintainer now. |
Right, didn't know that was the new process. All done now, it seems. |
Yep, going forward the maintainer for a specific area needs to approve PRs related to their area, or for areas without a specific maintainer it falls back to gfgtdf (for code). |
Reverts the assertion concerning nonzero window dimensions in
gui/widgets/window.cpp; it turns out that some windows do request zero
dimension, and it doesn't hurt anything for them to.
Fixes #4960.