diff options
| author | Jan Lingscheid <jan.linscheid@auticon.de> | 2017-09-11 12:40:00 +0000 |
|---|---|---|
| committer | Jan Lingscheid <jan.lingscheid@auticon.de> | 2017-09-21 05:46:21 +0000 |
| commit | 9bedc7179f307d9ee937c527f7e879a08e6ce98d (patch) | |
| tree | c4e15fb85b471be5966ef37446a66dcfcc533b2b /src/axis-manip.cpp | |
| parent | Update expected renderings. (diff) | |
| download | inkscape-9bedc7179f307d9ee937c527f7e879a08e6ce98d.tar.gz inkscape-9bedc7179f307d9ee937c527f7e879a08e6ce98d.zip | |
Refactor Box3d::string_from_axes to use Glib::ustring
Diffstat (limited to 'src/axis-manip.cpp')
| -rw-r--r-- | src/axis-manip.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/axis-manip.cpp b/src/axis-manip.cpp index 8955202c8..2332bc0a3 100644 --- a/src/axis-manip.cpp +++ b/src/axis-manip.cpp @@ -32,12 +32,12 @@ get_remaining_axes (Axis axis) { return std::make_pair (extract_first_axis_direction (plane), extract_second_axis_direction (plane)); } -char * string_from_axes (Box3D::Axis axis) { - GString *pstring = g_string_new(""); - if (axis & Box3D::X) g_string_append_printf (pstring, "X"); - if (axis & Box3D::Y) g_string_append_printf (pstring, "Y"); - if (axis & Box3D::Z) g_string_append_printf (pstring, "Z"); - return pstring->str; +Glib::ustring string_from_axes (Box3D::Axis axis) { + Glib::ustring result; + if (axis & Box3D::X) result += "X"; + if (axis & Box3D::Y) result += "Y"; + if (axis & Box3D::Z) result += "Z"; + return result; } } // namespace Box3D |
