summaryrefslogtreecommitdiffstats
path: root/Source/cmList.h
Commit message (Collapse)AuthorAgeFilesLines
* cmList: Use ptrdiff_t for index_typeAlex Richardson2024-03-081-2/+2
| | | | | | | | | | | | | | | In commit 87fe031a07 (cmList class: various enhancements, 2023-04-26, v3.27.0-rc1~142^2~1) this changed from `int` to `intptr_t`, but on some systems (e.g. CHERI-enabled Arm or RISC-V), `intptr_t` is larger than 64 bits and using it for `index_type` here incurs an unnecessary performance penalty. Additionally, using `intptr_t` here results in an ambiguous overload while calling `cmStrCat` with `intptr_t`: `error: conversion from '__intcap' to 'const cmAlphaNum' is ambiguous`. Instead of adding `intptr_t` overloads for `cmAlphaNum` for CHERI systems, we can change the type to `ptrdiff_t` (which will be the same as `intptr_t` on all other systems) and avoid carrying diffs that only compile with a CHERI enabled compiler.
* cmList: Avoid using operator-> on input iteratorBrad King2023-11-071-1/+1
| | | | As of C++23, some standard library iterator types deprecate it.
* Reduce sign conversion warningsMatthew Woehlke2023-08-291-4/+6
| | | | | | | | | | Add some static casts to make explicit some sign conversions in order to avoid warnings about the same. This is by no means an attempt to fix all such warnings, but these instances were especially egregious as they would be raised across many source files. Also change a post-increment of an iterator to pre-increment. At worst, this does nothing, but pre-increment is potentially more efficient.
* Merge topic 'cmList-INSERT-regression'Brad King2023-08-191-2/+13
|\ | | | | | | | | | | | | | | 45ed175f08 list(INSERT): restore old behavior Acked-by: Kitware Robot <kwrobot@kitware.com> Tested-by: buildbot <buildbot@kitware.com> Merge-request: !8732
| * list(INSERT): restore old behaviorMarc Chevrier2023-08-171-2/+13
| | | | | | | | Fixes: #25191
| * cmList: Fix performance regression in append/prependMarc Chevrier2023-08-041-16/+41
| | | | | | | | Fixes: #25147
* | cmList: Fix performance regression in append/prependMarc Chevrier2023-08-041-18/+20
| | | | | | | | Fixes: #25147
* | cmList: Fix performance regression in Join / to_stringNicolas van Kempen2023-07-061-7/+6
| | | | | | | | | | | | Refactoring in commit 45f17e5a85 (cmList: Add container conversion to string, 2023-06-20) accidentally introduced unnecessary string copies and allocations. Remove unnecessary copies.
* | cmList: Add container conversion to stringMarc Chevrier2023-06-221-3/+38
|/
* list(): restore SUBLIST behaviorMarc Chevrier2023-06-161-1/+1
| | | | Fixes: #25002
* CMake code rely on cmList class for CMake lists management (part. 2)Marc Chevrier2023-04-291-0/+19
|
* cmList class: various enhancementsMarc Chevrier2023-04-291-85/+170
|
* cmExpandList and cmExpandLists rely on cmList classMarc Chevrier2023-04-231-3/+53
|
* cmList: CMake list implementationMarc Chevrier2023-04-051-0/+1198
Fixes: #24548