Avoid "call of overloaded 'log(int)' is ambiguous" errors.

Fixes build on SunOS/GCC.
This commit is contained in:
jperkin 2013-06-21 19:23:19 +00:00
parent 74bf3c541c
commit eb6a848185
7 changed files with 137 additions and 1 deletions

View file

@ -1,5 +1,11 @@
$NetBSD: distinfo,v 1.25 2008/08/27 12:21:23 markd Exp $
$NetBSD: distinfo,v 1.26 2013/06/21 19:23:19 jperkin Exp $
SHA1 (kdeaccessibility-3.5.10.tar.bz2) = 748f155d303b098bc8b6f4731bb860046f5c1846
RMD160 (kdeaccessibility-3.5.10.tar.bz2) = ffefc1e1a3e66cbd35ead44a84824faa254d228e
Size (kdeaccessibility-3.5.10.tar.bz2) = 8745587 bytes
SHA1 (patch-kttsd_kcmkttsmgr_kcmkttsmgr.cpp) = 0566f84d0b31f46fbf231103becc718ecbd52383
SHA1 (patch-kttsd_plugins_epos_eposconf.cpp) = 30faa6d7ddc2a06b1bdd7cdfc58dd2dc536b11ae
SHA1 (patch-kttsd_plugins_epos_eposproc.cpp) = 5e875e947a48db3fc6bcb709d4fe1d0cc1dc3785
SHA1 (patch-kttsd_plugins_festivalint_festivalintconf.cpp) = 92938020f5c8a6f372452cee84f5007e4e27681c
SHA1 (patch-kttsd_plugins_festivalint_festivalintproc.cpp) = 938b0a596180d08858e6c0765930083a94b508b3
SHA1 (patch-kttsd_plugins_hadifix_hadifixconfigui.ui.h) = b5f736b0417de807ae01876f4eed793a2ba8ce69

View file

@ -0,0 +1,24 @@
$NetBSD: patch-kttsd_kcmkttsmgr_kcmkttsmgr.cpp,v 1.1 2013/06/21 19:23:19 jperkin Exp $
Avoid "call of overloaded 'log(int)' is ambiguous" errors.
--- kttsd/kcmkttsmgr/kcmkttsmgr.cpp.orig 2006-03-17 10:07:37.000000000 +0000
+++ kttsd/kcmkttsmgr/kcmkttsmgr.cpp
@@ -2139,13 +2139,13 @@ void KCMKttsMgr::keepAudioCheckBox_toggl
// with alpha = 1000/(log(200)-log(50))
int KCMKttsMgr::percentToSlider(int percentValue) {
- double alpha = 1000 / (log(200) - log(50));
- return (int)floor (0.5 + alpha * (log(percentValue)-log(50)));
+ double alpha = 1000 / (log((float)200) - log((float)50));
+ return (int)floor (0.5 + alpha * (log((float)percentValue)-log((float)50)));
}
int KCMKttsMgr::sliderToPercent(int sliderValue) {
- double alpha = 1000 / (log(200) - log(50));
- return (int)floor(0.5 + exp (sliderValue/alpha + log(50)));
+ double alpha = 1000 / (log((float)200) - log((float)50));
+ return (int)floor(0.5 + exp (sliderValue/alpha + log((float)50)));
}
void KCMKttsMgr::timeBox_valueChanged(int percentValue) {

View file

@ -0,0 +1,24 @@
$NetBSD: patch-kttsd_plugins_epos_eposconf.cpp,v 1.1 2013/06/21 19:23:19 jperkin Exp $
Avoid "call of overloaded 'log(int)' is ambiguous" errors.
--- kttsd/plugins/epos/eposconf.cpp.orig 2006-01-19 16:17:11.000000000 +0000
+++ kttsd/plugins/epos/eposconf.cpp
@@ -293,13 +293,13 @@ void EposConf::slotSynthStopped()
// with alpha = 1000/(log(200)-log(50))
int EposConf::percentToSlider(int percentValue) {
- double alpha = 1000 / (log(200) - log(50));
- return (int)floor (0.5 + alpha * (log(percentValue)-log(50)));
+ double alpha = 1000 / (log((float)200) - log((float)50));
+ return (int)floor (0.5 + alpha * (log((float)percentValue)-log((float)50)));
}
int EposConf::sliderToPercent(int sliderValue) {
- double alpha = 1000 / (log(200) - log(50));
- return (int)floor(0.5 + exp (sliderValue/alpha + log(50)));
+ double alpha = 1000 / (log((float)200) - log((float)50));
+ return (int)floor(0.5 + exp (sliderValue/alpha + log((float)50)));
}
void EposConf::timeBox_valueChanged(int percentValue) {

View file

@ -0,0 +1,17 @@
$NetBSD: patch-kttsd_plugins_epos_eposproc.cpp,v 1.1 2013/06/21 19:23:19 jperkin Exp $
Avoid "call of overloaded 'log(int)' is ambiguous" errors.
--- kttsd/plugins/epos/eposproc.cpp.orig 2006-01-19 16:17:11.000000000 +0000
+++ kttsd/plugins/epos/eposproc.cpp
@@ -215,8 +215,8 @@ void EposProc::synth(
// Map 50% to 200% onto 0 to 1000.
// slider = alpha * (log(percent)-log(50))
// with alpha = 1000/(log(200)-log(50))
- double alpha = 1000 / (log(200) - log(50));
- int slider = (int)floor (0.5 + alpha * (log(time)-log(50)));
+ double alpha = 1000 / (log((float)200) - log((float)50));
+ int slider = (int)floor (0.5 + alpha * (log((float)time)-log((float)50)));
// Center at 0.
slider = slider - 500;
// Map -500 to 500 onto 45 to -45 then shift to 130 to 40 (85 midpoint).

View file

@ -0,0 +1,24 @@
$NetBSD: patch-kttsd_plugins_festivalint_festivalintconf.cpp,v 1.1 2013/06/21 19:23:19 jperkin Exp $
Avoid "call of overloaded 'log(int)' is ambiguous" errors.
--- kttsd/plugins/festivalint/festivalintconf.cpp.orig 2005-10-10 14:52:49.000000000 +0000
+++ kttsd/plugins/festivalint/festivalintconf.cpp
@@ -696,13 +696,13 @@ void FestivalIntConf::slotSelectVoiceCom
// with alpha = 1000/(log(200)-log(50))
int FestivalIntConf::percentToSlider(int percentValue) {
- double alpha = 1000 / (log(200) - log(50));
- return (int)floor (0.5 + alpha * (log(percentValue)-log(50)));
+ double alpha = 1000 / (log((float)200) - log((float)50));
+ return (int)floor (0.5 + alpha * (log((float)percentValue)-log((float)50)));
}
int FestivalIntConf::sliderToPercent(int sliderValue) {
- double alpha = 1000 / (log(200) - log(50));
- return (int)floor(0.5 + exp (sliderValue/alpha + log(50)));
+ double alpha = 1000 / (log((float)200) - log((float)50));
+ return (int)floor(0.5 + exp (sliderValue/alpha + log((float)50)));
}
void FestivalIntConf::volumeBox_valueChanged(int percentValue) {

View file

@ -0,0 +1,17 @@
$NetBSD: patch-kttsd_plugins_festivalint_festivalintproc.cpp,v 1.1 2013/06/21 19:23:19 jperkin Exp $
Avoid "call of overloaded 'log(int)' is ambiguous" errors.
--- kttsd/plugins/festivalint/festivalintproc.cpp.orig 2005-10-10 14:52:49.000000000 +0000
+++ kttsd/plugins/festivalint/festivalintproc.cpp
@@ -262,8 +262,8 @@ void FestivalIntProc::synth(
// Map 50% to 200% onto 0 to 1000.
// slider = alpha * (log(percent)-log(50))
// with alpha = 1000/(log(200)-log(50))
- double alpha = 1000 / (log(200) - log(50));
- int slider = (int)floor (0.5 + alpha * (log(time)-log(50)));
+ double alpha = 1000 / (log((float)200) - log((float)50));
+ int slider = (int)floor (0.5 + alpha * (log((float)time)-log((float)50)));
// Center at 0.
slider = slider - 500;
// Map -500 to 500 onto 0.15 to -0.15.

View file

@ -0,0 +1,24 @@
$NetBSD: patch-kttsd_plugins_hadifix_hadifixconfigui.ui.h,v 1.1 2013/06/21 19:23:19 jperkin Exp $
Avoid "call of overloaded 'log(int)' is ambiguous" errors.
--- kttsd/plugins/hadifix/hadifixconfigui.ui.h.orig 2005-09-10 08:13:47.000000000 +0000
+++ kttsd/plugins/hadifix/hadifixconfigui.ui.h
@@ -13,13 +13,13 @@
// with alpha = 1000/(log(200)-log(50))
int HadifixConfigUI::percentToSlider (int percentValue) {
- double alpha = 1000 / (log(200) - log(50));
- return (int)floor (0.5 + alpha * (log(percentValue)-log(50)));
+ double alpha = 1000 / (log((float)200) - log((float)50));
+ return (int)floor (0.5 + alpha * (log((float)percentValue)-log((float)50)));
}
int HadifixConfigUI::sliderToPercent (int sliderValue) {
- double alpha = 1000 / (log(200) - log(50));
- return (int)floor(0.5 + exp (sliderValue/alpha + log(50)));
+ double alpha = 1000 / (log((float)200) - log((float)50));
+ return (int)floor(0.5 + exp (sliderValue/alpha + log((float)50)));
}
void HadifixConfigUI::volumeBox_valueChanged (int percentValue) {