[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/trunk r11660: Use template arguments inste
From: |
Benjamin Wolsey |
Subject: |
[Gnash-commit] /srv/bzr/gnash/trunk r11660: Use template arguments instead of C-style casts. |
Date: |
Sun, 29 Nov 2009 09:07:23 +0100 |
User-agent: |
Bazaar (1.16.1) |
------------------------------------------------------------
revno: 11660
committer: Benjamin Wolsey <address@hidden>
branch nick: trunk
timestamp: Sun 2009-11-29 09:07:23 +0100
message:
Use template arguments instead of C-style casts.
modified:
libcore/asobj/flash/media/Microphone_as.cpp
=== modified file 'libcore/asobj/flash/media/Microphone_as.cpp'
--- a/libcore/asobj/flash/media/Microphone_as.cpp 2009-11-28 10:50:24
+0000
+++ b/libcore/asobj/flash/media/Microphone_as.cpp 2009-11-29 08:07:23
+0000
@@ -296,7 +296,8 @@
return as_value();
}
- const int32_t gain = clamp(fn.arg(0).to_int(), (boost::int32_t)0,
(boost::int32_t)100);
+ const boost::int32_t gain =
+ clamp<boost::int32_t>(fn.arg(0).to_int(), 0, 100);
ptr->setGain(gain);
return as_value();
}
@@ -453,7 +454,7 @@
if (numargs > 1) {
// If it's less than 0, it's set to 0.
- const int timeout = std::max(fn.arg(1).to_int(), (boost::int32_t)0);
+ const int timeout = std::max<boost::int32_t>(fn.arg(1).to_int(), 0);
ptr->setSilenceTimeout(timeout);
}
return as_value();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/trunk r11660: Use template arguments instead of C-style casts.,
Benjamin Wolsey <=