audiomixerboard size_t clean-up#2893
Conversation
4aa32ab to
321b705
Compare
e4d9a57 to
06a05cc
Compare
06a05cc to
f2d0dbb
Compare
ann0see
left a comment
There was a problem hiding this comment.
Is there any valid reason why size_t is prefered by Qt? I doubt we get over the positive integer range anywhere.
563f2f1 to
02c7128
Compare
09f1fc4 to
85ef075
Compare
85ef075 to
fee011a
Compare
hoffie
left a comment
There was a problem hiding this comment.
I don't see anything wrong here, but I can't say that I'm able to assess that everything is right... ;)
Fixes warnings in Qt Creator in one file. Warnings of a similar nature are also available.
What are those warnings?
I wish cut-n-paste from the warnings was simple. They seemed to be Qt IDE rather than Compiler warnings (so the compile output didn't show them). Whilst correct (i.e. size_t can hold a larger number than int as it's unsigned), the int usage is also correct in places (we use -1 as an invalid index into an array or list, which has an index type of size_t, so doing something like will get a warning, as someArray could be so big that even taking one off the size is still too large a positive number for the int to hold. In practice, we generally use no extent over about 256 (sound card buffer size is probably the worst - maybe 4K? - still well under the number an int can hold). |
fee011a to
ce34498
Compare
Short description of changes
Small patch to
audiomixerboard.cppto clean up warnings in Qt Creator. Changesinttosize_twhere appropriate and handles any casts required.CHANGELOG: Refactor: use
size_tfor vector and array indexes that must not be negativeContext: Fixes an issue?
Fixes warnings in Qt Creator in one file. Warnings of a similar nature are also available.
Does this change need documentation? What needs to be documented and how?
No.
Status of this Pull Request
I use it in the client I run when jamming and it seems okay.
What is missing until this pull request can be merged?
Needs a review.
Checklist
AUTOBUILD: Please build all targets