summaryrefslogtreecommitdiffstats
path: root/src/document.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2008-06-12 09:49:31 +0000
committerjoncruz <joncruz@users.sourceforge.net>2008-06-12 09:49:31 +0000
commitd4a4862e200c5cc05641199769c9bbfef66e9a3b (patch)
treebd97d1a0a4bdf5585c7327edd21b19db3ee86e53 /src/document.cpp
parentpatch 185522 (diff)
downloadinkscape-d4a4862e200c5cc05641199769c9bbfef66e9a3b.tar.gz
inkscape-d4a4862e200c5cc05641199769c9bbfef66e9a3b.zip
Fixed uninitialized variables, including modified-since-save.
(bzr r5897)
Diffstat (limited to 'src/document.cpp')
-rw-r--r--src/document.cpp45
1 files changed, 21 insertions, 24 deletions
diff --git a/src/document.cpp b/src/document.cpp
index 333ce8d5a..af65d2d30 100644
--- a/src/document.cpp
+++ b/src/document.cpp
@@ -77,33 +77,30 @@ static gint doc_count = 0;
static unsigned long next_serial = 0;
-SPDocument::SPDocument() {
- SPDocumentPrivate *p;
-
- keepalive = FALSE;
- virgin = TRUE;
-
- modified_id = 0;
-
- rdoc = NULL;
- rroot = NULL;
- root = NULL;
- style_cascade = cr_cascade_new(NULL, NULL, NULL);
-
- uri = NULL;
- base = NULL;
- name = NULL;
-
- _collection_queue = NULL;
-
- // Initialise instance of connector router.
- router = new Avoid::Router();
+SPDocument::SPDocument() :
+ keepalive(FALSE),
+ virgin(TRUE),
+ modified_since_save(FALSE),
+ rdoc(0),
+ rroot(0),
+ root(0),
+ style_cascade(cr_cascade_new(NULL, NULL, NULL)),
+ uri(0),
+ base(0),
+ name(0),
+ priv(0), // reset in ctor
+ actionkey(0),
+ modified_id(0),
+ profileManager(0), // deferred until after other initialization
+ router(new Avoid::Router()),
+ perspectives(0),
+ current_persp3d(0),
+ _collection_queue(0)
+{
// Don't use the Consolidate moves optimisation.
router->ConsolidateMoves = false;
- perspectives = NULL;
-
- p = new SPDocumentPrivate();
+ SPDocumentPrivate *p = new SPDocumentPrivate();
p->serial = next_serial++;