diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-07-11 11:38:46 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-07-11 11:38:46 -0400 |
commit | f47499f1579c47a15ebcdbcdc5f830748b05cc3c (patch) | |
tree | 602b295cbf9fe7a73e47a4574a7fd3db89c5cb9c /gtk2_ardour | |
parent | 27eecdc88b8db2d89efcc1205dd437466d50f058 (diff) |
Use g_random_int instead of ::random for portability
Diffstat (limited to 'gtk2_ardour')
-rw-r--r-- | gtk2_ardour/ui_config.cc | 2 | ||||
-rw-r--r-- | gtk2_ardour/utils.cc | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/gtk2_ardour/ui_config.cc b/gtk2_ardour/ui_config.cc index 86f03bbd95..573e509ab9 100644 --- a/gtk2_ardour/ui_config.cc +++ b/gtk2_ardour/ui_config.cc @@ -278,7 +278,7 @@ UIConfiguration::color_by_name (const std::string& name) } // cerr << string_compose (_("Color %1 not found"), name) << endl; - return RGBA_TO_UINT (random()%256,random()%256,random()%256,0xff); + return RGBA_TO_UINT (g_random_int()%256,g_random_int()%256,g_random_int()%256,0xff); } void diff --git a/gtk2_ardour/utils.cc b/gtk2_ardour/utils.cc index d4bc460269..eb3f4ab55d 100644 --- a/gtk2_ardour/utils.cc +++ b/gtk2_ardour/utils.cc @@ -781,9 +781,9 @@ unique_random_color (list<Gdk::Color>& used_colors) const int32_t max_saturation = 48000; // 65535 would open up the whole color wheel - newcolor.set_red (random() % max_saturation); - newcolor.set_blue (random() % max_saturation); - newcolor.set_green (random() % max_saturation); + newcolor.set_red (g_random_int() % max_saturation); + newcolor.set_blue (g_random_int() % max_saturation); + newcolor.set_green (g_random_int() % max_saturation); if (used_colors.size() == 0) { used_colors.push_back (newcolor); |