From 34e31d433108092130c48648939de51288961428 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 11 Aug 2020 11:09:07 +0200 Subject: [PATCH] [libcalamares] Revert PRIVATETEST - looks funny - is hard to get clang-format to respect this; it's intended as an access-modifier, but those are baked into the code rather than being configurable. - is probably rare enough that #ifdef is acceptable --- src/libcalamares/DllMacro.h | 12 ------------ src/libcalamares/Settings.h | 5 ++++- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/libcalamares/DllMacro.h b/src/libcalamares/DllMacro.h index 8613fa584..5677e928b 100644 --- a/src/libcalamares/DllMacro.h +++ b/src/libcalamares/DllMacro.h @@ -76,16 +76,4 @@ #endif #endif -/* - * For private functions that should be public for testing purposes, - * use PRIVATETEST, which is private except when building tests. - */ -#ifndef PRIVATETEST -#if defined( BUILD_AS_TEST ) -#define PRIVATETEST public -#else -#define PRIVATETEST private -#endif -#endif - #endif diff --git a/src/libcalamares/Settings.h b/src/libcalamares/Settings.h index 6aa308dc5..2ad489a15 100644 --- a/src/libcalamares/Settings.h +++ b/src/libcalamares/Settings.h @@ -46,7 +46,10 @@ class DLLEXPORT InstanceDescription { using InstanceKey = Calamares::ModuleSystem::InstanceKey; - PRIVATETEST : InstanceDescription( InstanceKey&& key, int weight ); +#ifdef BUILD_AS_TEST +public: +#endif + InstanceDescription( InstanceKey&& key, int weight ); public: /** @brief An invalid InstanceDescription