diff options
author | John Emmas <johne53@tiscali.co.uk> | 2013-08-26 17:28:03 +0100 |
---|---|---|
committer | John Emmas <johne53@tiscali.co.uk> | 2013-08-26 17:28:03 +0100 |
commit | c1a25550d118cecfce3699b47f7b53fa75e743c1 (patch) | |
tree | 7835837e29628a0f9421539184642369466c235e /libs/gtkmm2ext/actions.cc | |
parent | 9a877a54e868674a257fe92f695dee8399d8331a (diff) |
'libs/gtkmm2ext' - Use 'std::vector' instead of dynamically sized arrays (required to be buildable with MSVC)
Diffstat (limited to 'libs/gtkmm2ext/actions.cc')
-rw-r--r-- | libs/gtkmm2ext/actions.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/libs/gtkmm2ext/actions.cc b/libs/gtkmm2ext/actions.cc index 84a738f278..200308a254 100644 --- a/libs/gtkmm2ext/actions.cc +++ b/libs/gtkmm2ext/actions.cc @@ -27,6 +27,7 @@ #include <gtk/gtkuimanager.h> #include <gtk/gtkactiongroup.h> +#include <gtkmm.h> #include <gtkmm/accelmap.h> #include <gtkmm/uimanager.h> @@ -265,15 +266,15 @@ ActionManager::get_action (const char* path) path++; } - char copy[len+1]; - strcpy (copy, path); - char* slash = strchr (copy, '/'); + vector<char> copy(len+1); + strcpy (©[0], path); + char* slash = strchr (©[0], '/'); if (!slash) { return RefPtr<Action> (); } *slash = '\0'; - return get_action (copy, ++slash); + return get_action (©[0], ++slash); } |