From 8867de5daf309e4cdd3fce177b408618490be4f3 Mon Sep 17 00:00:00 2001 From: Abhishek Sharma Public Date: Tue, 29 Jun 2010 23:35:42 +0530 Subject: This is the first c++ification commit from me. It handles sp-line, sp-polyline, sp-item and marks the onset of document c++ification as well. Users can check performace increase with [/usr/bin/time -v inkscape_binary_with_commandline_options]. (bzr r9546.1.1) --- src/application/editor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/application/editor.cpp') diff --git a/src/application/editor.cpp b/src/application/editor.cpp index 49010efdc..d2ccccbe3 100644 --- a/src/application/editor.cpp +++ b/src/application/editor.cpp @@ -76,10 +76,10 @@ Editor::init() // gchar const *tmpl = g_build_filename ((INKSCAPE_TEMPLATESDIR), "default.svg", NULL); bool have_default = Inkscape::IO::file_test (tmpl, G_FILE_TEST_IS_REGULAR); - SPDocument *doc = sp_document_new (have_default? tmpl:0, true, true); + SPDocument *doc = SPDocument::createDoc (have_default? tmpl:0, true, true); g_return_val_if_fail (doc != 0, false); Inkscape::UI::View::EditWidget *ew = new Inkscape::UI::View::EditWidget (doc); - sp_document_unref (doc); + doc->doUnref (); _window = ew->getWindow(); return ew != 0; } @@ -129,7 +129,7 @@ Editor::createDesktop (SPDocument* doc) { g_assert (doc != 0); (new Inkscape::UI::View::EditWidget (doc))->present(); - sp_document_unref (doc); + doc->doUnref (); SPDesktop *dt = getActiveDesktop(); reactivateDesktop (dt); return dt; -- cgit v1.2.3