Part of warnings
parent
38417fa286
commit
67587c663d
|
@ -74,21 +74,25 @@ private
|
|||
size_t current_pos = 0;
|
||||
|
||||
// Read endian
|
||||
bool endian_explicit = false;
|
||||
Endian endian_found = std.system.endian;
|
||||
switch(data[0])
|
||||
{
|
||||
case '=':
|
||||
endian_found = std.system.endian;
|
||||
current_pos++;
|
||||
endian_explicit = true;
|
||||
break;
|
||||
case '<':
|
||||
endian_found = Endian.littleEndian;
|
||||
current_pos++;
|
||||
endian_explicit = true;
|
||||
break;
|
||||
case '!':
|
||||
case '>':
|
||||
endian_found = Endian.bigEndian;
|
||||
current_pos++;
|
||||
endian_explicit = true;
|
||||
break;
|
||||
default:
|
||||
}
|
||||
|
@ -153,6 +157,8 @@ private
|
|||
assert(false, "Unknown format string: '" ~ data[current_pos..$] ~ "'");
|
||||
}
|
||||
|
||||
// TODO: Warn if endian isn't set explicit
|
||||
|
||||
// Return new struct
|
||||
assert(current_pos == data.length);
|
||||
Element result = {endian: endian_found, is_array: set_size, array_size: size, format_type: format_type_found};
|
||||
|
|
Loading…
Reference in New Issue