 |
Changeset 3114
- Timestamp:
- 01/22/08 17:38:58
(7 months ago)
- Author:
- larsivi
- Message:
Compile workaround for Bugzilla 617 on 64 bit arches
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r3042 |
r3114 |
|
| 83 | 83 | T* p2 = p; |
|---|
| 84 | 84 | |
|---|
| 85 | | int i = parseIntMax(p, 3u); |
|---|
| | 85 | int i = parseIntMax(p, cast(size_t)3); |
|---|
| 86 | 86 | |
|---|
| 87 | 87 | if (i) if (p - p2 == 2) { |
|---|
| … | … | |
| 131 | 131 | if (!( |
|---|
| 132 | 132 | demand(p, '-') && |
|---|
| 133 | | (date.day = parseIntMax(p, 2u)) != 0 && date.day <= daysPerMonth(date.month, date.year) |
|---|
| | 133 | (date.day = parseIntMax(p, cast(size_t)2)) != 0 && date.day <= daysPerMonth(date.month, date.year) |
|---|
| 134 | 134 | )) { |
|---|
| 135 | 135 | date.day = 0; |
|---|
| … | … | |
| 269 | 269 | accept(p, 'T'); |
|---|
| 270 | 270 | |
|---|
| 271 | | if (parseInt(p, 2u, time.hours) != 2 || time.hours > 24) |
|---|
| | 271 | if (parseInt(p, cast(size_t)2, time.hours) != 2 || time.hours > 24) |
|---|
| 272 | 272 | return (time.hours = 0); |
|---|
| 273 | 273 | |
|---|
| … | … | |
| 302 | 302 | !checkColon() || |
|---|
| 303 | 303 | |
|---|
| 304 | | parseInt(p, 2u, time.minutes) != 2 || time.minutes > 59 || |
|---|
| | 304 | parseInt(p, cast(size_t)2, time.minutes) != 2 || time.minutes > 59 || |
|---|
| 305 | 305 | |
|---|
| 306 | 306 | // hour 24 is only for 24:00:00 |
|---|
| … | … | |
| 343 | 343 | if ( |
|---|
| 344 | 344 | !checkColon() || |
|---|
| 345 | | parseInt(p, 2u, time.seconds) != 2 || time.seconds > 60 || |
|---|
| | 345 | parseInt(p, cast(size_t)2, time.seconds) != 2 || time.seconds > 60 || |
|---|
| 346 | 346 | (time.hours == 24 && time.seconds != 0) || |
|---|
| 347 | 347 | (time.seconds == 60 && time.hours != 23 && time.minutes != 59) |
|---|
| … | … | |
| 396 | 396 | |
|---|
| 397 | 397 | if ( |
|---|
| 398 | | doIso8601Date(p, src, date, 0u, sep) && |
|---|
| | 398 | doIso8601Date(p, src, date, cast(size_t)0, sep) && |
|---|
| 399 | 399 | date.year && date.month && date.day && |
|---|
| 400 | 400 | |
|---|
| … | … | |
| 645 | 645 | scope(exit) time.hours = cast(uint)realhour; |
|---|
| 646 | 646 | scope(exit) time.minutes = cast(uint)realminute; |
|---|
| 647 | | if (parseInt(p, 2u, hour) != 2 || hour > 12 || (hour == 0 && factor == 1)) |
|---|
| | 647 | if (parseInt(p, cast(size_t)2, hour) != 2 || hour > 12 || (hour == 0 && factor == 1)) |
|---|
| 648 | 648 | return BAD; |
|---|
| 649 | 649 | |
|---|
| … | … | |
| 694 | 694 | |
|---|
| 695 | 695 | int minute; |
|---|
| 696 | | if (parseInt(p, 2u, minute) != 2) |
|---|
| | 696 | if (parseInt(p, cast(size_t)2, minute) != 2) |
|---|
| 697 | 697 | return BAD; |
|---|
| 698 | 698 | |
|---|
| … | … | |
| 764 | 764 | // note: ISO 8601 code relies on these values always being positive, failing if *p == '-' |
|---|
| 765 | 765 | |
|---|
| 766 | | private uint parseIntMax(T) (ref T* p) { |
|---|
| 767 | | uint value = 0; |
|---|
| | 766 | private size_t parseIntMax(T) (ref T* p) { |
|---|
| | 767 | size_t value = 0; |
|---|
| 768 | 768 | while (*p >= '0' && *p <= '9') |
|---|
| 769 | 769 | value = value * 10 + *p++ - '0'; |
|---|
| … | … | |
| 773 | 773 | // ... but accept no more than max digits |
|---|
| 774 | 774 | |
|---|
| 775 | | private uint parseIntMax(T)(ref T* p, uint max) { |
|---|
| | 775 | private size_t parseIntMax(T)(ref T* p, size_t max) { |
|---|
| 776 | 776 | size_t i = 0; |
|---|
| 777 | | uint value = 0; |
|---|
| | 777 | size_t value = 0; |
|---|
| 778 | 778 | while (p[i] >= '0' && p[i] <= '9' && i < max) |
|---|
| 779 | 779 | value = value * 10 + p[i++] - '0'; |
|---|
| … | … | |
| 790 | 790 | } |
|---|
| 791 | 791 | |
|---|
| 792 | | private size_t parseInt(T, U)(ref T* p, uint max, out U i) { |
|---|
| | 792 | private size_t parseInt(T, U)(ref T* p, size_t max, out U i) { |
|---|
| 793 | 793 | T* p2 = p; |
|---|
| 794 | 794 | i = cast(U)parseIntMax(p, max); |
|---|
Download in other formats:
|
 |
 |
|
 |
Copyright © 2006-2008 Tango. All Rights Reserved. | Page Width:
Static or
Dynamic