Default struct member reordering for minimal size

Rule: largest members to smallest; if same size, order in source order
This commit is contained in:
Ginger Bill
2016-09-10 11:24:50 +01:00
parent 6979678ff9
commit 7509cdceb8
7 changed files with 66 additions and 35 deletions
+1 -1
View File
@@ -6,7 +6,7 @@ print_string_to_buffer :: proc(buf: ^[]byte, s: string) {
// NOTE(bill): This is quite a hack
// TODO(bill): Should I allow the raw editing of a slice by exposing its
// internal members?
Raw_Bytes :: struct {
Raw_Bytes :: struct #ordered {
data: ^byte
len: int
cap: int