From d2004d32f6561e59754f90dc50f774ed8f768afe Mon Sep 17 00:00:00 2001
From: wrrrzr <161970349+wrrrzr@users.noreply.github.com>
Date: Sat, 4 Jan 2025 14:39:52 +0300
Subject: [PATCH] Move AutoExposure constructor to header

---
 src/CMakeLists.txt |  1 -
 src/lighting.cpp   | 14 --------------
 src/lighting.h     |  9 ++++++++-
 3 files changed, 8 insertions(+), 16 deletions(-)
 delete mode 100644 src/lighting.cpp

diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 692651049..88c0c5a45 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -417,7 +417,6 @@ set(independent_SRCS
 	hud.cpp
 	inventory.cpp
 	itemstackmetadata.cpp
-	lighting.cpp
 	log.cpp
 	metadata.cpp
 	modchannels.cpp
diff --git a/src/lighting.cpp b/src/lighting.cpp
deleted file mode 100644
index b8def7728..000000000
--- a/src/lighting.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// Luanti
-// SPDX-License-Identifier: LGPL-2.1-or-later
-// Copyright (C) 2021 x2048, Dmitry Kostenko <codeforsmile@gmail.com>
-
-#include "lighting.h"
-
-AutoExposure::AutoExposure()
-	: luminance_min(-3.f),
-	luminance_max(-3.f),
-	exposure_correction(0.0f),
-	speed_dark_bright(1000.f),
-	speed_bright_dark(1000.f),
-	center_weight_power(1.f)
-{}
diff --git a/src/lighting.h b/src/lighting.h
index ab40d546d..4ba1b37ef 100644
--- a/src/lighting.h
+++ b/src/lighting.h
@@ -30,7 +30,14 @@ struct AutoExposure
 	/// @brief Power value for center-weighted metering. Value of 1.0 measures entire screen uniformly
 	float center_weight_power;
 
-	AutoExposure();
+	constexpr AutoExposure()
+		: luminance_min(-3.f),
+		luminance_max(-3.f),
+		exposure_correction(0.0f),
+		speed_dark_bright(1000.f),
+		speed_bright_dark(1000.f),
+		center_weight_power(1.f)
+	{}
 };
 
 /** Describes ambient light settings for a player