Commit Graph

797 Commits

Author SHA1 Message Date
Alligator-1
cb237c9008 const for TFormatSettings 2025-03-09 14:53:24 +00:00
Michaël Van Canneyt
35a21de57c * Allow TFormatSettings.Create with string (using callback) 2025-02-19 20:36:54 +01:00
Michaël Van Canneyt
545db4a070 * Extend GetLocalTimeOffset to return Dst or not 2025-02-19 17:31:01 +01:00
Rika Ichinose
6631f83ccf Change CompareChar uses inside compiler/RTL to CompareByte. 2025-02-07 20:51:50 +03:00
Sven/Sarah Barth
9fccadc1f0 * leave GetFileContents() early if the file size is 0 to avoid a range error if the RTL is compiled with range checks 2025-01-13 23:30:02 +01:00
Rika Ichinose
9dfbc38a50 Don’t use explicit Move in Extract<T> and Swap<T>. 2024-12-23 21:06:22 +00:00
Michaël Van Canneyt
0c83b3dc6c * Add Delphi-Compatible new findCmdLineSwitch overload 2024-11-23 10:23:36 +01:00
Frederic Kehrein
64c27a86a8 * Adding new generic Extract and Swap function to RTL
These allow to move data from one variable to another without triggering
the copy operation. Extract makes use of the newly introduced move
semantic for function results and Swap uses System.Move to not trigger
the copy mechanism.
2024-11-16 22:08:06 +00:00
Zoë Peterson
208806f27f Make SysUtils' TSystemTime declaration on non-Windows platforms compatible with the Win32 and Delphi declarations 2024-11-07 18:58:18 -06:00
Rika Ichinose
0b97f169b0 Remove conditionals that rely on not defined(FPC_HAS_CPSTRING). 2024-11-04 10:28:33 +00:00
Sven/Sarah Barth
2ef822e8e8 * fix #40305: with type helpers now supporting inheriting from unique type aliases, declare a TRealHelper as a descendant of TDoubleHelper (cause Real is a Double)
+ added test
2024-10-25 15:26:32 +02:00
Michaël Van Canneyt
a2deb9cbf1 * Allow %o, let %p handle object pointers and class pointers. Fixes issue #40762 2024-10-09 09:11:08 +02:00
florian
2f0cd77d86 * remove outdated defines, resolves #40897 2024-08-21 23:08:33 +02:00
Michaël Van Canneyt
0533acdc27 * Add RangeIndexError (delphi compatible) 2024-08-14 15:14:24 +02:00
Rika Ichinose
a575a5c0fd Move Int128Rec to System; remove i386 and x86_64 CPU unit dependency on SysUtils. 2024-07-15 13:31:20 +00:00
Alligator-1
326073512d const array - reducing unnecessary data copying 2024-07-08 06:26:17 +00:00
Michaël Van Canneyt
680c096ac5 * Delphi compatibility: ListIndexErrorMsg 2024-07-05 15:55:47 +02:00
Michaël Van Canneyt
193f20b697 * Merge request !710 2024-07-03 08:32:17 +02:00
Alligator-1
10dd493057 without copy 2024-07-03 09:05:02 +05:00
Michaël Van Canneyt
8cd3e72b36 * Reflow code for clarity 2024-07-01 08:32:10 +02:00
Alligator-1
c2bca23fd1 Taking advantage of fpc_ansistr_concat_multi 2024-07-01 08:54:32 +05:00
Alligator-1
f60bed0823 Without a copy in most cases 2024-06-30 22:04:42 +05:00
Rika Ichinose
ff9fe851fb Let “Trim”s return string uncopied. 2024-06-09 19:35:22 +00:00
marcoonthegit
2ec99cc82e * skip empty path components in concatpaths, related to #40682 2024-04-03 14:40:32 +02:00
Michaël Van Canneyt
48cb0eb5b1 * force correct strpas overload when using unicodestrings 2024-03-04 16:49:58 +01:00
Michaël Van Canneyt
bc714c0fd7 * Added Delphi-compatible overload for ToString with UpdateCapacity argument 2024-02-20 14:49:13 +01:00
Michaël Van Canneyt
6f25cccda9 * Select proper stringbuilder depending on size of char 2024-02-20 10:46:44 +01:00
Michaël Van Canneyt
1e1b273c67 * Correct TCharArray declaration, disambiguate between widechar/char 2024-02-20 10:16:56 +01:00
Michaël Van Canneyt
c9b7a3b3b5 * Use value for fmShareNoLocking which does not overlap with classes fmCreate 2024-01-30 13:35:54 +01:00
Michaël Van Canneyt
e79f5ef577 * Introduce fmShareNoLocking to disable locking of file descriptors on unix 2024-01-28 11:30:37 +01:00
Michaël Van Canneyt
c2383fc207 * Correct casing. Fixes #40589 2024-01-10 09:43:51 +01:00
Michaël Van Canneyt
29f2f12496 * Some code cleanup in Extract* functions. Fixes issue #40587 2024-01-06 21:42:03 +01:00
Michaël Van Canneyt
ed000e6cd7 * Fix wrong TimeStampToMSecs result on 32-bit. Fixes issue #40522 2023-12-22 11:32:57 +01:00
marcoonthegit
d91847f39c * typo fix in previous commit relating to #40558 2023-12-14 09:59:04 +01:00
marcoonthegit
59883da0a0 * fix for drive existence in windows app modus, closes #40558 2023-12-14 09:37:42 +01:00
Michaël Van Canneyt
ff8511f2f1 * Define INVALID_HANDLE_VALUE for Delphi compatibility 2023-11-29 15:03:12 +01:00
Michaël Van Canneyt
7e4aca384f * Some delphi compatibility issues solved (PtrToNil and TGUID operator) 2023-11-29 14:34:27 +01:00
Rika Ichinose
05b7ebd34e Add Exchange<T> that works like std::exchange in C++. 2023-11-21 04:34:16 +03:00
Michaël Van Canneyt
2d3cd5bff2 * Add CreateFmt constructor for EInOutArgumentException 2023-11-20 21:45:53 +01:00
Michaël Van Canneyt
6eac18e8c1 * Add some missing exception classes 2023-11-19 16:20:08 +01:00
Michaël Van Canneyt
45021498cf * Add unicode AnsiLastChar overload 2023-11-14 10:26:49 +01:00
Michaël Van Canneyt
ea63bfb32f * Fix string type in AnsiLastChar declaration 2023-11-14 10:23:34 +01:00
Michaël Van Canneyt
9f62b33ef0 * Add ChangeFilePath 2023-11-10 18:14:03 +01:00
Rika Ichinose
ce1a82a1e4 Add potentially required barriers to TEnconding. 2023-11-10 02:36:04 +03:00
Michaël Van Canneyt
8fb39925eb * Implement ListIndexError 2023-11-09 11:43:19 +01:00
Rika Ichinose
d04547eb83 Replace TEncoding.FLock with interlocked operations. 2023-11-09 09:11:00 +00:00
Michaël Van Canneyt
82bc91e6cf * Make explicit how much better FPC is when compared to Delphi ;) 2023-11-03 11:52:14 +01:00
Michaël Van Canneyt
122ef8bb76 * Make sure it compiles with 3.2.2 2023-11-01 23:37:12 +01:00
Michaël Van Canneyt
81e2db47a9 * Add some methods to TFormatSettings for Delphi compatibility 2023-11-01 21:38:55 +01:00
Michaël Van Canneyt
d587f48892 * Fix typos, missing sparc 2023-10-27 09:57:35 +02:00