OLD | NEW |
---|---|
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "core/fxcrt/include/fx_ext.h" | 9 #include "core/fxcrt/include/fx_ext.h" |
10 #include "core/fxcrt/include/fx_xml.h" | 10 #include "core/fxcrt/include/fx_xml.h" |
(...skipping 3637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3648 if (cc < len) { | 3648 if (cc < len) { |
3649 if (str[cc] == '.') { | 3649 if (str[cc] == '.') { |
3650 cc++; | 3650 cc++; |
3651 cc_start = cc; | 3651 cc_start = cc; |
3652 while (cc < len && cc < cc_start + 3) { | 3652 while (cc < len && cc < cc_start + 3) { |
3653 if (!FX_IsDigit(str[cc])) { | 3653 if (!FX_IsDigit(str[cc])) { |
3654 return FALSE; | 3654 return FALSE; |
3655 } | 3655 } |
3656 millisecond = millisecond * 10 + str[cc++] - '0'; | 3656 millisecond = millisecond * 10 + str[cc++] - '0'; |
3657 } | 3657 } |
3658 if (cc < cc_start + 3 || millisecond >= 1000) { | 3658 if (cc < cc_start + 3) |
Tom Sepez
2016/05/23 16:57:54
wow ... was there some compiler smart enough to kn
Wei Li
2016/05/23 17:10:44
Yes, GCC wants to optimize this away. It is not th
| |
3659 return FALSE; | 3659 return FALSE; |
3660 } | |
3661 } | 3660 } |
3662 if (cc < len) { | 3661 if (cc < len) { |
3663 FX_TIMEZONE tzDiff; | 3662 FX_TIMEZONE tzDiff; |
3664 tzDiff.tzHour = 0; | 3663 tzDiff.tzHour = 0; |
3665 tzDiff.tzMinute = 0; | 3664 tzDiff.tzMinute = 0; |
3666 if (str[cc] != 'Z') { | 3665 if (str[cc] != 'Z') { |
3667 cc += FX_ParseTimeZone(str + cc, len - cc, tzDiff); | 3666 cc += FX_ParseTimeZone(str + cc, len - cc, tzDiff); |
3668 } | 3667 } |
3669 FX_ResolveZone(hour, minute, tzDiff, pLocale); | 3668 FX_ResolveZone(hour, minute, tzDiff, pLocale); |
3670 } | 3669 } |
(...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4774 } | 4773 } |
4775 CFX_Decimal CFX_Decimal::operator*(const CFX_Decimal& val) const { | 4774 CFX_Decimal CFX_Decimal::operator*(const CFX_Decimal& val) const { |
4776 return Multiply(val); | 4775 return Multiply(val); |
4777 } | 4776 } |
4778 CFX_Decimal CFX_Decimal::operator/(const CFX_Decimal& val) const { | 4777 CFX_Decimal CFX_Decimal::operator/(const CFX_Decimal& val) const { |
4779 return Divide(val); | 4778 return Divide(val); |
4780 } | 4779 } |
4781 CFX_Decimal CFX_Decimal::operator%(const CFX_Decimal& val) const { | 4780 CFX_Decimal CFX_Decimal::operator%(const CFX_Decimal& val) const { |
4782 return Modulus(val); | 4781 return Modulus(val); |
4783 } | 4782 } |
OLD | NEW |