Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-05-29 08:53:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-06-13 18:47:11 +0400
commitf3e4f426659e1dc1b2171f416d322562f2ccda19 (patch)
treed202e42f68ee7f17b34541d62325dca08da88358 /source
parent1962e21703b33bdaae87accc638cfe49ac737f64 (diff)
Code cleanup: remove hack for older GCC (4.2x and newer work without)
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/interface/interface.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 19d4e32152f..94a9d55b70e 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -1796,18 +1796,7 @@ void ui_set_but_val(uiBut *but, double value)
value = (char)floor(value + 0.5);
}
else if (but->pointype == UI_BUT_POIN_SHORT) {
- /* gcc 3.2.1 seems to have problems
- * casting a double like 32772.0 to
- * a short so we cast to an int, then
- * to a short.
- *
- * Update: even in gcc.4.6 using intermediate int cast gives -32764,
- * where as a direct cast from double to short gives -32768,
- * if this difference isn't important we could remove this hack,
- * since we dont support gcc3 anymore - Campbell */
- int gcckludge;
- gcckludge = (int) floor(value + 0.5);
- value = (short)gcckludge;
+ value = (short)floor(value + 0.5);
}
else if (but->pointype == UI_BUT_POIN_INT)
value = (int)floor(value + 0.5);