diff options
author | John Emmas <johne53@tiscali.co.uk> | 2013-10-03 09:12:02 +0100 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2013-10-03 09:12:02 +0100 |
commit | d7a16f7de648907d5d9156da2f79bd5034f399f9 (patch) | |
tree | fdb13b2ad49365378fad4b84cf1330d833c7543b /gtk2_ardour/big_clock_window.cc | |
parent | f8574fc39db29188958f8aebb5b8544ae015718e (diff) |
'gtk2_ardour' - Use 'std::vector' to implement an array whose size is unknown (required to be buildable with MSVC)
Diffstat (limited to 'gtk2_ardour/big_clock_window.cc')
-rw-r--r-- | gtk2_ardour/big_clock_window.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/gtk2_ardour/big_clock_window.cc b/gtk2_ardour/big_clock_window.cc index 5b369a68c1..c67ae38074 100644 --- a/gtk2_ardour/big_clock_window.cc +++ b/gtk2_ardour/big_clock_window.cc @@ -19,6 +19,7 @@ #include <algorithm> #include <string> +#include <vector> #include "ardour_ui.h" #include "audio_clock.h" @@ -138,11 +139,11 @@ BigClockWindow::text_resizer (int, int) if (size != current_size) { string family = fd.get_family(); - char buf[family.length()+16]; - snprintf (buf, family.length()+16, "%s %d", family.c_str(), size); + std::vector<char> buf(family.length()+16); + snprintf (&buf[0], family.length()+16, "%s %d", family.c_str(), size); try { - Pango::FontDescription fd (buf); + Pango::FontDescription fd (&buf[0]); Glib::RefPtr<Gtk::RcStyle> rcstyle = clock.get_modifier_style (); rcstyle->set_font (fd); clock.modify_style (rcstyle); |