• Tomaž Vajngerl's avatar
    Replace compile time test with a static_assert · 60de1cb0
    Tomaž Vajngerl yazdı
    There is no need to check this in a test when we can do it
    directly in the header. static_assert will complain when compiling
    something that uses the header file instead of waiting that it
    finds a piece of code, where it is actually needed. The purpose of
    the test was the same (fail early).
    
    The main problem was that Color can be created and converted to
    sal_uInt32 string completely in compile time, so it can be used for
    "case" in a "switch" statement, which requires that in "case" it
    uses a constant. Normally this isn't possible unless we resolve
    and convert a Color to sal_uInt32 in compile time.
    This use-case is used somewhere in the code, but it takes a lot
    of (re)compiling to get to that piece of code, where it would
    eventually fail.
    
    Change-Id: I1f1f9b77c19a0e61f78ce703b380d98a569da833
    Reviewed-on: https://gerrit.libreoffice.org/71060Reviewed-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
    Tested-by: 's avatarTomaž Vajngerl <quikee@gmail.com>
    60de1cb0
Adı
Son kayıt (commit)
Son güncelleme
..
inc Loading commit data...
qa Loading commit data...
source Loading commit data...
CppunitTest_tools_config.mk Loading commit data...
CppunitTest_tools_test.mk Loading commit data...
CustomTarget_reversemap.mk Loading commit data...
Executable_bestreversemap.mk Loading commit data...
Library_tl.mk Loading commit data...
Makefile Loading commit data...
Module_tools.mk Loading commit data...
README Loading commit data...
StaticLibrary_ooopathutils.mk Loading commit data...