This patch adds a thousands separator to the stats in the info header so they are more readable.
(from T38898)
Details
Details
- Reviewers
Diego Gangl (januz) - Group Reviewers
User Interface
Diff Detail
Diff Detail
Event Timeline
| source/blender/blenlib/BLI_string.h | ||
|---|---|---|
| 67 | prefer BLI_str*** prefix, eg. BLI_str_number_separator ? (names aren't so obvious) Could also take length of out to avoid buffer overflow. | |
| source/blender/blenlib/intern/string.c | ||
| 764 | why is this static? and why an int? did you mean const ? | |
| 769 | can replace strcpy with memcpy using length from sprintf | |
| 774 | can avoid a call to strlen() here, by getting the value from sprintf | |
Comment Actions
Applied all changes. Also changed a few things to follow the style of the rest of the code better.
Comment Actions
Committed rB4cc93123c8120f1f52af44c18236114b5cf5d999
- Python calls this decimal grouping, so named BLI_str_format_int_grouped (number is too vague and confused with float's)
- turns out size wont exceed 16 chars for int32_t, so just define arg size as 16 (size checking was incorrect, and making it work was a bit of a hassle).
- added support for negative numbers.
- use macro in scene stats.
- added GTest's