head 1.2; access; symbols pkgsrc-2024Q1:1.1.0.38 pkgsrc-2024Q1-base:1.1 pkgsrc-2023Q4:1.1.0.36 pkgsrc-2023Q4-base:1.1 pkgsrc-2023Q3:1.1.0.34 pkgsrc-2023Q3-base:1.1 pkgsrc-2023Q2:1.1.0.32 pkgsrc-2023Q2-base:1.1 pkgsrc-2023Q1:1.1.0.30 pkgsrc-2023Q1-base:1.1 pkgsrc-2022Q4:1.1.0.28 pkgsrc-2022Q4-base:1.1 pkgsrc-2022Q3:1.1.0.26 pkgsrc-2022Q3-base:1.1 pkgsrc-2022Q2:1.1.0.24 pkgsrc-2022Q2-base:1.1 pkgsrc-2022Q1:1.1.0.22 pkgsrc-2022Q1-base:1.1 pkgsrc-2021Q4:1.1.0.20 pkgsrc-2021Q4-base:1.1 pkgsrc-2021Q3:1.1.0.18 pkgsrc-2021Q3-base:1.1 pkgsrc-2021Q2:1.1.0.16 pkgsrc-2021Q2-base:1.1 pkgsrc-2021Q1:1.1.0.14 pkgsrc-2021Q1-base:1.1 pkgsrc-2020Q4:1.1.0.12 pkgsrc-2020Q4-base:1.1 pkgsrc-2020Q3:1.1.0.10 pkgsrc-2020Q3-base:1.1 pkgsrc-2020Q2:1.1.0.8 pkgsrc-2020Q2-base:1.1 pkgsrc-2020Q1:1.1.0.4 pkgsrc-2020Q1-base:1.1 pkgsrc-2019Q4:1.1.0.6 pkgsrc-2019Q4-base:1.1 pkgsrc-2019Q3:1.1.0.2 pkgsrc-2019Q3-base:1.1; locks; strict; comment @// @; 1.2 date 2024.05.06.14.04.25; author nia; state dead; branches; next 1.1; commitid PHDh14yHJMEwEW8F; 1.1 date 2019.07.05.08.01.31; author nia; state Exp; branches; next ; commitid BdkMjdkdTzmdrPtB; desc @@ 1.2 log @assaultcube: Update to 1.3.0.2 Changes: https://assault.cubers.net/docs/history.html @ text @$NetBSD: patch-source_src_editing.cpp,v 1.1 2019/07/05 08:01:31 nia Exp $ [PATCH] fix some errors and warnings for GCC 6 - do not use std::abs() because math.h includes one, that converts ints to double. Use own iabs(), which directly uses labs() instead. - don't use the word "gamma" as name for variables - don't use a homebrew round() function https://github.com/assaultcube/AC/commit/752950989b4e286459ca9aee3d61a868d7b20fa4 --- source/src/editing.cpp.orig 2013-10-22 18:57:16.000000000 +0000 +++ source/src/editing.cpp @@@@ -126,11 +126,11 @@@@ void checkselections() void makesel(bool isnew) { block &cursel = sels.last(); //RR 10/12/12 - FIXEME, error checking should happen with "isnew", not here checking if it really is new. - if(isnew || sels.length() == 0) addselection(min(lastx, cx), min(lasty, cy), abs(lastx-cx)+1, abs(lasty-cy)+1, max(lasth, ch)); + if(isnew || sels.length() == 0) addselection(min(lastx, cx), min(lasty, cy), iabs(lastx-cx)+1, iabs(lasty-cy)+1, max(lasth, ch)); else { cursel.x = min(lastx, cx); cursel.y = min(lasty, cy); - cursel.xs = abs(lastx-cx)+1; cursel.ys = abs(lasty-cy)+1; + cursel.xs = iabs(lastx-cx)+1; cursel.ys = iabs(lasty-cy)+1; cursel.h = max(lasth, ch); correctsel(cursel); } @@@@ -645,7 +645,7 @@@@ void movemap(int xo, int yo, int zo) // } if(xo || yo) { - block b = { max(-xo, 0), max(-yo, 0), ssize - abs(xo), ssize - abs(yo) }, *cp = blockcopy(b); + block b = { max(-xo, 0), max(-yo, 0), ssize - iabs(xo), ssize - iabs(yo) }, *cp = blockcopy(b); cp->x = max(xo, 0); cp->y = max(yo, 0); blockpaste(*cp); @ 1.1 log @assaultcube: Backport gcc6 fixes from upstream. This compiled successfully on NetBSD-current with gcc7, so it seems this mainly helps other OSes. @ text @d1 1 a1 1 $NetBSD$ @