summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2016-09-29 15:22:52 (GMT)
committerTobias Markmann <tm@ayena.de>2016-09-29 15:22:52 (GMT)
commit9abfaaa771f91010dbe01a1b9b5b9e2801956718 (patch)
tree618a5f66ea97d3d8552f72aad6a8e1313c56ec6e /Swiften/Elements
parent2bf44a1d641c3bc35546cb49d3766f2962f9a984 (diff)
downloadswift-9abfaaa771f91010dbe01a1b9b5b9e2801956718.zip
swift-9abfaaa771f91010dbe01a1b9b5b9e2801956718.tar.bz2
Fix uninitialised class members
Initialised previously uninitialised class members. Changed some raw pointers to std::unique_ptr for clearer and automatically initialised code. Test-Information: Builds on macOS 10.12 and unit tests pass in ASAN-enabled build. Change-Id: I7900fe6131119c228ca92c79c0ee8125137f2e48
Diffstat (limited to 'Swiften/Elements')
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardEllipseElement.h2
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardFreehandPathElement.h2
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardOperation.h2
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardPolygonElement.h2
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardTextElement.h2
-rw-r--r--Swiften/Elements/Whiteboard/WhiteboardUpdateOperation.h2
6 files changed, 6 insertions, 6 deletions
diff --git a/Swiften/Elements/Whiteboard/WhiteboardEllipseElement.h b/Swiften/Elements/Whiteboard/WhiteboardEllipseElement.h
index 7d80bf7..8086aed 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardEllipseElement.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardEllipseElement.h
@@ -76,6 +76,6 @@ namespace Swift {
int cx_, cy_, rx_, ry_;
WhiteboardColor penColor_;
WhiteboardColor brushColor_;
- int penWidth_;
+ int penWidth_ = 0;
};
}
diff --git a/Swiften/Elements/Whiteboard/WhiteboardFreehandPathElement.h b/Swiften/Elements/Whiteboard/WhiteboardFreehandPathElement.h
index b8b7e54..bc6c846 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardFreehandPathElement.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardFreehandPathElement.h
@@ -59,6 +59,6 @@ namespace Swift {
private:
std::vector<Point> points_;
WhiteboardColor color_;
- int penWidth_;
+ int penWidth_ = 0;
};
}
diff --git a/Swiften/Elements/Whiteboard/WhiteboardOperation.h b/Swiften/Elements/Whiteboard/WhiteboardOperation.h
index 7d48e4d..2e90c69 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardOperation.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardOperation.h
@@ -54,6 +54,6 @@ namespace Swift {
private:
std::string id_;
std::string parentID_;
- int pos_;
+ int pos_ = 0;
};
}
diff --git a/Swiften/Elements/Whiteboard/WhiteboardPolygonElement.h b/Swiften/Elements/Whiteboard/WhiteboardPolygonElement.h
index b8591cf..6ad5dc7 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardPolygonElement.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardPolygonElement.h
@@ -67,6 +67,6 @@ namespace Swift {
std::vector<Point> points_;
WhiteboardColor penColor_;
WhiteboardColor brushColor_;
- int penWidth_;
+ int penWidth_ = 0;
};
}
diff --git a/Swiften/Elements/Whiteboard/WhiteboardTextElement.h b/Swiften/Elements/Whiteboard/WhiteboardTextElement.h
index 41f31f6..2e1c145 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardTextElement.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardTextElement.h
@@ -64,7 +64,7 @@ namespace Swift {
private:
int x_, y_;
- int size_;
+ int size_ = 0;
std::string text_;
WhiteboardColor color_;
};
diff --git a/Swiften/Elements/Whiteboard/WhiteboardUpdateOperation.h b/Swiften/Elements/Whiteboard/WhiteboardUpdateOperation.h
index b6dfd4f..36cbc6d 100644
--- a/Swiften/Elements/Whiteboard/WhiteboardUpdateOperation.h
+++ b/Swiften/Elements/Whiteboard/WhiteboardUpdateOperation.h
@@ -39,6 +39,6 @@ namespace Swift {
private:
WhiteboardElement::ref element_;
- int newPos_;
+ int newPos_ = 0;
};
}