From 13e995b811e80dc48c0769274d3dca3a2221b843 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Blot?= Date: Thu, 17 Aug 2017 23:02:50 +0200 Subject: Modernize src/c* src/d* and src/e* files (#6263) * Modernize src/c* src/d* and src/e* files * default operator * redundant init * delete default constructors on CraftDefinition childs (never used) * fix some missing init values * const ref fix reported by clang-tidy * ranged-based for loops * simple conditions & returns * empty stl function instead of size * emplace_back stl function instead of push_back + construct temp obj * auto for some iterators * code style fixes * c++ stl headers instead of C stl headers (stdio.h -> cstdio) --- src/daynightratio.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/daynightratio.h') diff --git a/src/daynightratio.h b/src/daynightratio.h index 3b71ee84e..f959cdf6c 100644 --- a/src/daynightratio.h +++ b/src/daynightratio.h @@ -50,16 +50,17 @@ inline u32 time_to_daynight_ratio(float time_of_day, bool smooth) return values[i][1]; } return 1000; - } else { - for(u32 i=0; i