octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MSVC compilation fixes


From: John W. Eaton
Subject: MSVC compilation fixes
Date: Wed, 09 Jul 2008 11:10:15 -0400

On 20-Jun-2008, Michael Goffioul wrote:

| Please consider the following patch for inclusion
| 
| http://hg.tw-math.de/octave-graphics-mq/rev/a15e56860500
| 
| It fixes various compile problem and/or typos that makes it
| compile with MSVC. Note that the changes related to the
| "pow" function should be reviewed, as I'm not sure if my
| modifications are correct.

diff -r 7683fa6c06a2 src/OPERATORS/op-int.h
--- a/src/OPERATORS/op-int.h    Mon Feb 11 10:11:56 2008 +0100
+++ b/src/OPERATORS/op-int.h    Fri Jun 20 12:40:27 2008 +0200
@@ -227,13 +227,13 @@
   octave_value \
   xpow (const octave_ ## T1& a, float b) \
   { \
-    return pow (a, b); \
+    return pow (a, static_cast<double> (b)); \
   } \

Shouldn't we use powf here instead?  Does MSVC provide powf, or do we
need a replacement in lo-specfun.cc (or lo-mappers.cc; I'm not sure
now why these files aren't combined)?

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]