Refactoring patches
Pavel Sanda
sanda at lyx.org
Mon Oct 12 13:51:01 UTC 2020
On Mon, Oct 12, 2020 at 03:33:45PM +0300, Yuriy Skalko wrote:
The 1-3 patches look fine.
> From 7081d5c9f2e441fdce68d672fd07da6f1c121bfc Mon Sep 17 00:00:00 2001
> From: Yuriy Skalko <yuriy.skalko at gmail.com>
> Date: Mon, 12 Oct 2020 15:30:07 +0300
> Subject: [PATCH 4/4] Remove unused forward declarations and header includes
> diff --git a/src/frontends/qt/GuiCharacter.cpp b/src/frontends/qt/GuiCharacter.cpp
> index d1d4336fc2..cfa481c832 100644
> --- a/src/frontends/qt/GuiCharacter.cpp
> +++ b/src/frontends/qt/GuiCharacter.cpp
> @@ -18,7 +18,6 @@
> #include "GuiApplication.h"
> #include "qt_helpers.h"
>
> -#include "Font.h"
Getting rid of unnecessary includes is a valuable goal.
There are two things to keep in mind:
- One should try to get rid of redundant includes from headers first, only after that reducing .cpp files (otherwise the check of .h files becomes more tricky).
- some generic headers were included as a consequence of different dependencies on different gcc versions or exotic architectures..
What kind of tool/script you used to find out?
(I have something in my attic from couple years back when I was going through similar loop.)
Pavel
More information about the lyx-devel
mailing list