Commit Graph

2215 Commits

Author SHA1 Message Date
florian
9c8f362acc * more robust calculation of TBITS_SHIFT 2022-11-06 22:33:38 +01:00
Rika Ichinose
7243befdb7 Better TBits. 2022-11-06 20:55:38 +00:00
Michaël Van Canneyt
d5777174d8 * Optimization of TStringHelper.Split by Rika. Fixes issue #39948 2022-10-13 12:45:30 +02:00
florian
989895c82f * patch by Bart B: FormatFloat correctly outputs NaN now, resolves #32868
+ test
2022-10-11 22:11:33 +02:00
florian
3963a30f9e * prettier exception message, resolves #39909 2022-09-18 15:50:55 +02:00
florian
717d38f060 * prettier casing of Str* functions, resolves #39879 2022-08-25 20:40:23 +02:00
marcoonthegit
9ad1995c6d * Patch by Rika to have a char specific TStringHelper.replace. Probably faster with low number of char matches. closes #39707
* also raise rangeerror for startindex<0 in previous committed join() patch.
2022-08-20 16:16:58 +02:00
marcoonthegit
d25daba08a * Patch from Alexey T. closes #39705
* don't use copy in helper.indexof(). Watch those 0 based indexes.
2022-08-18 13:59:00 +02:00
florian
9e14dee1c3 * fixed Math.Tanh as proposed by Paolo Valle, resolves #39867 2022-08-17 20:56:43 +02:00
marcoonthegit
533cd82922 * applied patch from Alexey for closes #39704
* reviewed checks at start of function to match Delphi in rangecheck errors and other exits
 * test for the above.
2022-08-17 18:38:02 +02:00
florian
cc66eb27ab * patch by Rika: More numerical stability for Math, resolves #39863 2022-08-14 22:26:09 +02:00
marcoonthegit
f532cf1698 * Use an own put for tfpginterfacedobjectlist as per bug #39846.
Maybe not the most elegant, but solves the immediately
2022-08-14 16:24:35 +02:00
florian
306559667c * patch by Rika for ArcTan2 to reduce code size 2022-08-11 22:32:45 +02:00
florian
f18d6f1c85 * fixed and improved generic ArcTan2 implementation by Paolo Valle, resolves #39861 2022-08-10 18:23:22 +02:00
florian
30f5558bf2 * patch by Rika: optimize TStringHelper.StartsWith / EndsWith, resolves #39706 2022-07-14 22:38:07 +02:00
florian
0122044226 * part of last commit 2022-07-06 20:39:38 +02:00
florian
4fecfe3df3 * fix SysUtils.HashName as proposed by Awkward in #39827, resolves #39827
* adapted to syscodepages.inc for the fixed HashName
2022-07-06 20:38:45 +02:00
Michaël Van Canneyt
b2ad1d3efd * Patch from Bart. Fix for issue #39797 2022-06-25 14:33:33 +02:00
Michaël Van Canneyt
0cc00b355c * Fix by Bart to fix conversion to temperature. Fix issue 39776 2022-06-11 11:47:35 +02:00
marcoonthegit
2df9dd9c14 * another fix for bug #39758, this time the end of the string 2022-06-05 17:46:58 +02:00
marcoonthegit
5b90eaf2dd * move char index checks up. fixes bug #39758 2022-06-04 22:40:56 +02:00
marcoonthegit
e5ac0b2689 * anonymous method overloads for synchronize/queue. 2022-06-01 13:54:06 +02:00
marcoonthegit
d38c881828 * add IEquatable<T>, requested on forum. 2022-06-01 11:00:56 +02:00
Michaël Van Canneyt
712823eb6c * Add some delphi compatibility enumerateds to TShiftState 2022-05-07 10:20:04 +02:00
Michaël Van Canneyt
cab37732c4 * Avoid memory allocation in IsNullOrWhitespace. Fix issue #39702 2022-05-05 12:04:52 +02:00
marcoonthegit
c203097ec2 * add overload to getenvironmentvariable so that it is also found when windows is before sysutils in the uses list. bug #39448 2022-04-25 14:07:57 +02:00
Sven/Sarah Barth
862cffa087 * have the unsigned 32-bit overload of IntToHex use the signed 32-bit one to avoid usage of 64-bit arithmetic (and parameter passing) when it can be avoided 2022-04-19 14:24:01 +02:00
Sven/Sarah Barth
d32134dd1a * fix #39664: ensure that the 8- and 16-bit signed overloads of IntToHex return the correct number of digits
+ added test
2022-04-19 14:24:00 +02:00
marcoonthegit
2457016671 * TStringlist constructor with ownsobjects parameter, Delphi compatible + empty constructor to avoid compiler getting confused 2022-04-18 21:23:10 +02:00
inoussa
551f267670 Unicode source code's size reduction: short field names, delete unicodenumtable.pas. 2022-03-26 21:17:54 +00:00
inoussa
27ed2808dc Unicode 14, Unicode Collation Algorithm 14, CLDR 40 support. 2022-03-15 10:19:15 +00:00
Michaël Van Canneyt
5ca52bcab1 * Add Flush method to TFileStream. Fix issue #39619 2022-03-10 09:35:28 +01:00
Michaël Van Canneyt
59a7024d73 * Move() check for identical index. Additional fix for #39617 2022-03-08 11:42:24 +01:00
Michaël Van Canneyt
2a19e152b7 * Micro-optimization. Fix issue #39617 2022-03-08 11:35:43 +01:00
florian
15b7a8763f * avoid range check error and overflow in objpas.hash, should resolve #39561 2022-02-12 14:28:59 +01:00
Michaël Van Canneyt
f9a6e082ba * Remove duplicate HexDigits constants. Fix issue #39462 2022-01-31 10:05:33 +01:00
Michaël Van Canneyt
7097a1030f * Added Read64/Write64 2022-01-23 12:18:43 +01:00
Michaël Van Canneyt
042eb7e8c1 * Small safety precaution 2022-01-23 12:03:24 +01:00
Sergey Larin
e27ea76b88 The TStream.ReadBuffer and TStream.WriteBuffer methods have changed the Count parameter type to NativeInt.
Changed the implementation of ReadBuffer, WriteBuffer so that the size of the blocks when calling Read and Write does not exceed High(Longint).
Notes:
- Thanks to this change, for example, a file larger than 2GB can be loaded into TMemoryStream.
- The fact that the Count parameter has the NativeInt type is compatible with the latest versions of Delphi.
2022-01-23 10:25:55 +00:00
Michaël Van Canneyt
30b0d98636 * Change return type of some functions, so -1 can actually be returned, patch by Zeljko Avramovic (issue 39268). 2022-01-22 11:17:44 +01:00
Michaël Van Canneyt
d6a26f2c28 * Remove component from previous owner. Fix issue #39529 2022-01-13 22:41:01 +01:00
florian
0764158fd1 * reverted TryStrToInt to the old implementation since after the val fixed the changes are not
needed anymore as pointed out by Bart B
2022-01-09 18:35:31 +01:00
florian
983fbff871 * proper range checking for TryStrToDWord, should resolve all issues in #39406 2022-01-02 21:46:14 +01:00
florian
435f3a9fe2 * allow a range of Low(Longint) to High(DWord) in TryStrToInt, see also issue #39406
* moved test
2022-01-02 21:33:01 +01:00
florian
2a93e65511 * seperator => separator 2022-01-02 13:12:33 +01:00
Sven Barth
2636966e2a * adjust ToInteger of the Boolean helpers so that it returns the value of either True or False, but not any other value (e.g. in the *Bool types). This is not only Delphi compatible, but also fixes the compilation problem of the one or other 32-bit platform (like PowerPC) after e65b822a. 2021-12-05 00:03:05 +01:00
Sven/Sarah Barth
e65b822a0c + add type helpers for the remaining Boolean types (QWordBool and Boolean{8,16,32,64}) 2021-12-03 14:52:19 +01:00
Michaël Van Canneyt
b1412ec5c0 * Make hexdigits a global constant 2021-11-30 09:06:41 +01:00
florian
18e0979379 + Exception.GetBaseException 2021-11-23 23:01:06 +01:00
florian
64c21bb88b * fix bootstrapping wtih 3.2.2 and -Cpcoreavx2 2021-11-14 23:13:51 +01:00