summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-12-06 21:36:34 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-12-07 08:02:00 +0100
commit13c2ff932089db24841bb971b645141218bd8586 (patch)
tree1fc056e9e5531b9d039ecfcf19602cdce33222d2 /editor
parenta8ceb7e3f213216e4fb103a6a8687d007632f788 (diff)
Style: Apply new clang-format 5.0 style to all files
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_export.h5
-rw-r--r--editor/filesystem_dock.h10
-rw-r--r--editor/import/editor_import_collada.cpp2
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp25
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp4
-rw-r--r--editor/plugins/collision_polygon_2d_editor_plugin.cpp8
-rw-r--r--editor/plugins/curve_editor_plugin.cpp6
-rw-r--r--editor/plugins/line_2d_editor_plugin.cpp8
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.cpp8
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp8
-rw-r--r--editor/property_editor.cpp2
11 files changed, 47 insertions, 39 deletions
diff --git a/editor/editor_export.h b/editor/editor_export.h
index 346c3b58e1..215a770a12 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -122,8 +122,9 @@ struct SharedObject {
String path;
Vector<String> tags;
- SharedObject(const String &p_path, const Vector<String> &p_tags)
- : path(p_path), tags(p_tags) {
+ SharedObject(const String &p_path, const Vector<String> &p_tags) :
+ path(p_path),
+ tags(p_tags) {
}
SharedObject() {}
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index f1fd342052..b004b1974d 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -128,10 +128,12 @@ private:
String path;
bool is_file;
- FileOrFolder()
- : path(""), is_file(false) {}
- FileOrFolder(const String &p_path, bool p_is_file)
- : path(p_path), is_file(p_is_file) {}
+ FileOrFolder() :
+ path(""),
+ is_file(false) {}
+ FileOrFolder(const String &p_path, bool p_is_file) :
+ path(p_path),
+ is_file(p_is_file) {}
};
FileOrFolder to_rename;
Vector<FileOrFolder> to_move;
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp
index 3c73411dee..f51bc2d6be 100644
--- a/editor/import/editor_import_collada.cpp
+++ b/editor/import/editor_import_collada.cpp
@@ -1913,8 +1913,6 @@ void ColladaImport::create_animation(int p_clip, bool p_make_tracks_in_all_bones
/*************************************** SCENE ***********************************/
/*********************************************************************************/
-#define DEBUG_ANIMATION
-
uint32_t EditorSceneImporterCollada::get_import_flags() const {
return IMPORT_SCENE | IMPORT_ANIMATION;
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index 95ae3d5aed..ff72a5a25e 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -32,18 +32,21 @@
#include "canvas_item_editor_plugin.h"
#include "core/os/keyboard.h"
-AbstractPolygon2DEditor::Vertex::Vertex()
- : polygon(-1), vertex(-1) {
+AbstractPolygon2DEditor::Vertex::Vertex() :
+ polygon(-1),
+ vertex(-1) {
// invalid vertex
}
-AbstractPolygon2DEditor::Vertex::Vertex(int p_vertex)
- : polygon(-1), vertex(p_vertex) {
+AbstractPolygon2DEditor::Vertex::Vertex(int p_vertex) :
+ polygon(-1),
+ vertex(p_vertex) {
// vertex p_vertex of current wip polygon
}
-AbstractPolygon2DEditor::Vertex::Vertex(int p_polygon, int p_vertex)
- : polygon(p_polygon), vertex(p_vertex) {
+AbstractPolygon2DEditor::Vertex::Vertex(int p_polygon, int p_vertex) :
+ polygon(p_polygon),
+ vertex(p_vertex) {
// vertex p_vertex of polygon p_polygon
}
@@ -66,12 +69,14 @@ AbstractPolygon2DEditor::PosVertex::PosVertex() {
// invalid vertex
}
-AbstractPolygon2DEditor::PosVertex::PosVertex(const Vertex &p_vertex, const Vector2 &p_pos)
- : Vertex(p_vertex.polygon, p_vertex.vertex), pos(p_pos) {
+AbstractPolygon2DEditor::PosVertex::PosVertex(const Vertex &p_vertex, const Vector2 &p_pos) :
+ Vertex(p_vertex.polygon, p_vertex.vertex),
+ pos(p_pos) {
}
-AbstractPolygon2DEditor::PosVertex::PosVertex(int p_polygon, int p_vertex, const Vector2 &p_pos)
- : Vertex(p_polygon, p_vertex), pos(p_pos) {
+AbstractPolygon2DEditor::PosVertex::PosVertex(int p_polygon, int p_vertex, const Vector2 &p_pos) :
+ Vertex(p_polygon, p_vertex),
+ pos(p_pos) {
}
bool AbstractPolygon2DEditor::_is_empty() const {
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index ddcdb5a321..8eee9c7e7c 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -69,8 +69,8 @@ class SnapDialog : public ConfirmationDialog {
SpinBox *rotation_step;
public:
- SnapDialog()
- : ConfirmationDialog() {
+ SnapDialog() :
+ ConfirmationDialog() {
const int SPIN_BOX_GRID_RANGE = 256;
const int SPIN_BOX_ROTATION_RANGE = 360;
Label *label;
diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/editor/plugins/collision_polygon_2d_editor_plugin.cpp
index 00e6d617a1..6ac80caf94 100644
--- a/editor/plugins/collision_polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_polygon_2d_editor_plugin.cpp
@@ -39,10 +39,10 @@ void CollisionPolygon2DEditor::_set_node(Node *p_polygon) {
node = Object::cast_to<CollisionPolygon2D>(p_polygon);
}
-CollisionPolygon2DEditor::CollisionPolygon2DEditor(EditorNode *p_editor)
- : AbstractPolygon2DEditor(p_editor) {
+CollisionPolygon2DEditor::CollisionPolygon2DEditor(EditorNode *p_editor) :
+ AbstractPolygon2DEditor(p_editor) {
}
-CollisionPolygon2DEditorPlugin::CollisionPolygon2DEditorPlugin(EditorNode *p_node)
- : AbstractPolygon2DEditorPlugin(p_node, memnew(CollisionPolygon2DEditor(p_node)), "CollisionPolygon2D") {
+CollisionPolygon2DEditorPlugin::CollisionPolygon2DEditorPlugin(EditorNode *p_node) :
+ AbstractPolygon2DEditorPlugin(p_node, memnew(CollisionPolygon2DEditor(p_node)), "CollisionPolygon2D") {
}
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index 2754aeed06..f77016c1d6 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -586,8 +586,10 @@ struct CanvasItemPlotCurve {
Color color1;
Color color2;
- CanvasItemPlotCurve(CanvasItem &p_ci, Color p_color1, Color p_color2)
- : ci(p_ci), color1(p_color1), color2(p_color2) {}
+ CanvasItemPlotCurve(CanvasItem &p_ci, Color p_color1, Color p_color2) :
+ ci(p_ci),
+ color1(p_color1),
+ color2(p_color2) {}
void operator()(Vector2 pos0, Vector2 pos1, bool in_definition) {
ci.draw_line(pos0, pos1, in_definition ? color1 : color2);
diff --git a/editor/plugins/line_2d_editor_plugin.cpp b/editor/plugins/line_2d_editor_plugin.cpp
index 51fa488b43..04d8519b2f 100644
--- a/editor/plugins/line_2d_editor_plugin.cpp
+++ b/editor/plugins/line_2d_editor_plugin.cpp
@@ -61,10 +61,10 @@ void Line2DEditor::_action_set_polygon(int p_idx, const Variant &p_previous, con
undo_redo->add_undo_method(node, "set_points", p_previous);
}
-Line2DEditor::Line2DEditor(EditorNode *p_editor)
- : AbstractPolygon2DEditor(p_editor) {
+Line2DEditor::Line2DEditor(EditorNode *p_editor) :
+ AbstractPolygon2DEditor(p_editor) {
}
-Line2DEditorPlugin::Line2DEditorPlugin(EditorNode *p_node)
- : AbstractPolygon2DEditorPlugin(p_node, memnew(Line2DEditor(p_node)), "Line2D") {
+Line2DEditorPlugin::Line2DEditorPlugin(EditorNode *p_node) :
+ AbstractPolygon2DEditorPlugin(p_node, memnew(Line2DEditor(p_node)), "Line2D") {
}
diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp
index 6560a8dac7..36c608310b 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -120,10 +120,10 @@ void NavigationPolygonEditor::_create_resource() {
_menu_option(MODE_CREATE);
}
-NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor)
- : AbstractPolygon2DEditor(p_editor) {
+NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor) :
+ AbstractPolygon2DEditor(p_editor) {
}
-NavigationPolygonEditorPlugin::NavigationPolygonEditorPlugin(EditorNode *p_node)
- : AbstractPolygon2DEditorPlugin(p_node, memnew(NavigationPolygonEditor(p_node)), "NavigationPolygonInstance") {
+NavigationPolygonEditorPlugin::NavigationPolygonEditorPlugin(EditorNode *p_node) :
+ AbstractPolygon2DEditorPlugin(p_node, memnew(NavigationPolygonEditor(p_node)), "NavigationPolygonInstance") {
}
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index ebb5f57e99..25e734187d 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -459,8 +459,8 @@ Vector2 Polygon2DEditor::snap_point(Vector2 p_target) const {
return p_target;
}
-Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor)
- : AbstractPolygon2DEditor(p_editor) {
+Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) :
+ AbstractPolygon2DEditor(p_editor) {
snap_step = Vector2(10, 10);
use_snap = false;
@@ -609,6 +609,6 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor)
uv_edit_draw->set_clip_contents(true);
}
-Polygon2DEditorPlugin::Polygon2DEditorPlugin(EditorNode *p_node)
- : AbstractPolygon2DEditorPlugin(p_node, memnew(Polygon2DEditor(p_node)), "Polygon2D") {
+Polygon2DEditorPlugin::Polygon2DEditorPlugin(EditorNode *p_node) :
+ AbstractPolygon2DEditorPlugin(p_node, memnew(Polygon2DEditor(p_node)), "Polygon2D") {
}
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 0c1d7b9d9c..eed1efaf9c 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -3740,8 +3740,8 @@ void PropertyEditor::_item_edited() {
_edit_set(name, item->get_text(1), refresh_all);
}
} break;
- // math types
+ // math types
case Variant::VECTOR3: {
} break;