avoid possibly crashing static_cast
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>
Fri, 30 Sep 2022 19:36:58 +0000 (21:36 +0200)
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>
Mon, 3 Oct 2022 08:23:24 +0000 (10:23 +0200)
commitecc588c27a0a7c47f2090be864a111471c982dff
tree1875be01c8c1743e6758563ca57651abd45430fd
parentc40d948b564a1ca31bc41c626a773a0e72d6f364
avoid possibly crashing static_cast

ran
run-clang-tidy-14.py -header-filter='.*' -checks='-*,cppcoreguidelines-pro-type-static-cast-downcast' -fix

this can prevent casting to a type that is unrelated to the real type
and later cause a crash because you go into undefined behavior domain

Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
16 files changed:
src/3rdparty/kirigami/wheelhandler.cpp
src/gui/application.cpp
src/gui/creds/webflowcredentialsdialog.cpp
src/gui/folderstatusdelegate.cpp
src/gui/folderwizard.cpp
src/gui/selectivesyncdialog.cpp
src/gui/settingsdialog.cpp
src/gui/socketapi/socketapi.cpp
src/gui/tooltipupdater.cpp
src/gui/tray/sortedactivitylistmodel.cpp
src/gui/wizard/abstractcredswizardpage.cpp
src/gui/wizard/owncloudadvancedsetuppage.cpp
src/libsync/account.cpp
src/libsync/clientsideencryption.cpp
src/libsync/creds/httpcredentials.cpp
src/libsync/owncloudpropagator.cpp