summaryrefslogtreecommitdiff
path: root/sfx2/CppunitTest_sfx2_misc.mk
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2024-05-01 13:33:41 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-05-02 14:37:56 +0200
commitd4c0e39d93f3038a18cba975c25bb42aa125166c (patch)
treebc09721381615ec94bff792f5ede1e7319dbd970 /sfx2/CppunitTest_sfx2_misc.mk
parentb26ff81a6f8f5ad99bba153cf57bef68fd03930d (diff)
make the slot data constinit
because it takes a surprising amount of time to initialise it at runtime during startup (*) have to convert the std::function in SfxType to a function pointer, because the std::function constructor is not constinit compatible. (*) the SfxType0..SfxTypeN types need some reinterpret_cast to work around the lack of zero-sized trailing arrays in c++ (*) Sadly MSVC does not support taking the address of symbols in constinit structures, so we cannot make the SfxSlot array constinit. Change-Id: I300ee770cc115d30bc25c819f2ad34b29633876c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166963 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/CppunitTest_sfx2_misc.mk')
0 files changed, 0 insertions, 0 deletions