]> git.mxchange.org Git - flightgear.git/commitdiff
use assignment operators (to my defense: the *x/*y were different on both
authormfranz <mfranz>
Tue, 1 Aug 2006 15:49:29 +0000 (15:49 +0000)
committermfranz <mfranz>
Tue, 1 Aug 2006 15:49:29 +0000 (15:49 +0000)
sides of the equal sign at some time ... :-)

src/Instrumentation/HUD/HUD.cxx

index ca0ca143fdf54497a6b0b8ee412eda792723a70c..a5b6a4f530286852a923b94c394345f06bd1c68c 100644 (file)
@@ -457,18 +457,18 @@ void HUD::textAlign(fntRenderer *rend, const char *s, int align,
     font->getBBox(s, rend->getPointSize(), rend->getSlant(), &left, &right, &bot, &top);
 
     if (align & HUD::HCENTER)
-        *x = *x - left + gap - (right - left - gap) / 2.0;
+        *x -= left - gap + (right - left - gap) / 2.0;
     else if (align & HUD::RIGHT)
-        *x = *x - right;
+        *x -= right;
     else if (align & HUD::LEFT)
-        *x = *x - left;
+        *x -= left;
 
     if (align & HUD::VCENTER)
-        *y = *y - bot - (top - bot) / 2.0;
+        *y -= bot + (top - bot) / 2.0;
     else if (align & HUD::TOP)
-        *y = *y - top;
+        *y -= top;
     else if (align & HUD::BOTTOM)
-        *y = *y - bot;
+        *y -= bot;
 
     *l = *x + left;
     *r = *x + right;