Przeglądaj źródła

Remove generating of null comparison operators from documentation

Yuri Roubinsky 3 lat temu
rodzic
commit
32f2c47356

+ 0 - 10
doc/classes/AABB.xml

@@ -226,11 +226,6 @@
 		</member>
 	</members>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="AABB" />
@@ -246,11 +241,6 @@
 				Inversely transforms (multiplies) the [AABB] by the given [Transform3D] transformation matrix.
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="AABB" />

+ 0 - 10
doc/classes/Array.xml

@@ -509,11 +509,6 @@
 		</method>
 	</methods>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="Array" />
@@ -538,11 +533,6 @@
 			<description>
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="Array" />

+ 0 - 10
doc/classes/Basis.xml

@@ -223,11 +223,6 @@
 		</constant>
 	</constants>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="Basis" />
@@ -264,11 +259,6 @@
 				This operator multiplies all components of the [Basis], which scales it uniformly.
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="Basis" />

+ 0 - 10
doc/classes/Callable.xml

@@ -148,11 +148,6 @@
 		</method>
 	</methods>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="Callable" />
@@ -160,11 +155,6 @@
 				Returns [code]true[/code] if both [Callable]s invoke different targets.
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="Callable" />

+ 0 - 10
doc/classes/Color.xml

@@ -913,11 +913,6 @@
 		</constant>
 	</constants>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="Color" />
@@ -982,11 +977,6 @@
 				Divides each component of the [Color] by the given [int].
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="Color" />

+ 0 - 10
doc/classes/Dictionary.xml

@@ -305,22 +305,12 @@
 		</method>
 	</methods>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="Dictionary" />
 			<description>
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="Dictionary" />

+ 0 - 10
doc/classes/NodePath.xml

@@ -171,22 +171,12 @@
 		</method>
 	</methods>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="NodePath" />
 			<description>
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="NodePath" />

+ 0 - 10
doc/classes/PackedByteArray.xml

@@ -416,11 +416,6 @@
 		</method>
 	</methods>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedByteArray" />
@@ -433,11 +428,6 @@
 			<description>
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedByteArray" />

+ 0 - 10
doc/classes/PackedColorArray.xml

@@ -152,11 +152,6 @@
 		</method>
 	</methods>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedColorArray" />
@@ -169,11 +164,6 @@
 			<description>
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedColorArray" />

+ 0 - 10
doc/classes/PackedFloat32Array.xml

@@ -155,11 +155,6 @@
 		</method>
 	</methods>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedFloat32Array" />
@@ -172,11 +167,6 @@
 			<description>
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedFloat32Array" />

+ 0 - 10
doc/classes/PackedFloat64Array.xml

@@ -155,11 +155,6 @@
 		</method>
 	</methods>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedFloat64Array" />
@@ -172,11 +167,6 @@
 			<description>
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedFloat64Array" />

+ 0 - 10
doc/classes/PackedInt32Array.xml

@@ -155,11 +155,6 @@
 		</method>
 	</methods>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedInt32Array" />
@@ -172,11 +167,6 @@
 			<description>
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedInt32Array" />

+ 0 - 10
doc/classes/PackedInt64Array.xml

@@ -155,11 +155,6 @@
 		</method>
 	</methods>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedInt64Array" />
@@ -172,11 +167,6 @@
 			<description>
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedInt64Array" />

+ 0 - 10
doc/classes/PackedStringArray.xml

@@ -153,11 +153,6 @@
 		</method>
 	</methods>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedStringArray" />
@@ -170,11 +165,6 @@
 			<description>
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedStringArray" />

+ 0 - 10
doc/classes/PackedVector2Array.xml

@@ -153,11 +153,6 @@
 		</method>
 	</methods>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedVector2Array" />
@@ -176,11 +171,6 @@
 			<description>
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedVector2Array" />

+ 0 - 10
doc/classes/PackedVector3Array.xml

@@ -152,11 +152,6 @@
 		</method>
 	</methods>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedVector3Array" />
@@ -175,11 +170,6 @@
 			<description>
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="PackedVector3Array" />

+ 0 - 10
doc/classes/Plane.xml

@@ -171,11 +171,6 @@
 		</constant>
 	</constants>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="Plane" />
@@ -184,11 +179,6 @@
 				[b]Note:[/b] Due to floating-point precision errors, consider using [method is_equal_approx] instead, which is more reliable.
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="Plane" />

+ 0 - 10
doc/classes/Quaternion.xml

@@ -186,11 +186,6 @@
 		</constant>
 	</constants>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="Quaternion" />
@@ -255,11 +250,6 @@
 				Divides each component of the [Quaternion] by the given value. This operation is not meaningful on its own, but it can be used as a part of a larger expression.
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="Quaternion" />

+ 0 - 10
doc/classes/RID.xml

@@ -38,11 +38,6 @@
 		</method>
 	</methods>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="RID" />
@@ -61,11 +56,6 @@
 			<description>
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="RID" />

+ 0 - 10
doc/classes/Rect2.xml

@@ -187,11 +187,6 @@
 		</member>
 	</members>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="Rect2" />
@@ -207,11 +202,6 @@
 				Inversely transforms (multiplies) the [Rect2] by the given [Transform2D] transformation matrix.
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="Rect2" />

+ 0 - 10
doc/classes/Rect2i.xml

@@ -176,11 +176,6 @@
 		</member>
 	</members>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="Rect2i" />
@@ -188,11 +183,6 @@
 				Returns [code]true[/code] if the rectangles are not equal.
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="Rect2i" />

+ 0 - 10
doc/classes/Signal.xml

@@ -97,22 +97,12 @@
 		</method>
 	</methods>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="Signal" />
 			<description>
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="Signal" />

+ 0 - 10
doc/classes/String.xml

@@ -863,11 +863,6 @@
 		</method>
 	</methods>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="String" />
@@ -904,11 +899,6 @@
 			<description>
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="String" />

+ 0 - 10
doc/classes/StringName.xml

@@ -33,11 +33,6 @@
 		</constructor>
 	</constructors>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="String" />
@@ -62,11 +57,6 @@
 			<description>
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="String" />

+ 0 - 10
doc/classes/Transform2D.xml

@@ -204,11 +204,6 @@
 		</constant>
 	</constants>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="Transform2D" />
@@ -259,11 +254,6 @@
 				This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly.
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="Transform2D" />

+ 0 - 10
doc/classes/Transform3D.xml

@@ -146,11 +146,6 @@
 		</constant>
 	</constants>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="Transform3D" />
@@ -201,11 +196,6 @@
 				This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly.
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="Transform3D" />

+ 0 - 10
doc/classes/Vector2.xml

@@ -357,11 +357,6 @@
 		</constant>
 	</constants>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="Vector2" />
@@ -459,11 +454,6 @@
 				Compares two [Vector2] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="Vector2" />

+ 0 - 10
doc/classes/Vector2i.xml

@@ -131,11 +131,6 @@
 		</constant>
 	</constants>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="Vector2i" />
@@ -251,11 +246,6 @@
 				Compares two [Vector2i] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors. This operator is useful for sorting vectors.
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="Vector2i" />

+ 0 - 10
doc/classes/Vector3.xml

@@ -358,11 +358,6 @@
 		</constant>
 	</constants>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="Vector3" />
@@ -474,11 +469,6 @@
 				Compares two [Vector3] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="Vector3" />

+ 0 - 10
doc/classes/Vector3i.xml

@@ -138,11 +138,6 @@
 		</constant>
 	</constants>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="Vector3i" />
@@ -258,11 +253,6 @@
 				Compares two [Vector3i] vectors by first checking if the X value of the left vector is less than or equal to the X value of the [code]right[/code] vector. If the X values are exactly equal, then it repeats this check with the Y values of the two vectors, and then with the Z values. This operator is useful for sorting vectors.
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="Vector3i" />

+ 0 - 11
doc/classes/bool.xml

@@ -121,11 +121,6 @@
 		</constructor>
 	</constructors>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="bool" />
@@ -140,12 +135,6 @@
 				Returns [code]true[/code] if the left operand is [code]false[/code] and the right operand is [code]true[/code].
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-				Returns [code]true[/code] if two bools are equal, i.e. both are [code]true[/code] or both are [code]false[/code].
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="bool" />

+ 0 - 10
doc/classes/float.xml

@@ -42,11 +42,6 @@
 		</constructor>
 	</constructors>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="float" />
@@ -199,11 +194,6 @@
 				Returns [code]true[/code] if this [float] is less than or equal to the given [int].
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="float" />

+ 0 - 10
doc/classes/int.xml

@@ -68,11 +68,6 @@
 		</constructor>
 	</constructors>
 	<operators>
-		<operator name="operator !=">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator !=">
 			<return type="bool" />
 			<argument index="0" name="right" type="float" />
@@ -271,11 +266,6 @@
 				Returns [code]true[/code] the left integer is less than or equal to the right one.
 			</description>
 		</operator>
-		<operator name="operator ==">
-			<return type="bool" />
-			<description>
-			</description>
-		</operator>
 		<operator name="operator ==">
 			<return type="bool" />
 			<argument index="0" name="right" type="float" />

+ 5 - 0
editor/doc_tools.cpp

@@ -685,6 +685,11 @@ void DocTools::generate(bool p_basic_types) {
 
 		for (int j = 0; j < Variant::OP_AND; j++) { // Showing above 'and' is pretty confusing and there are a lot of variations.
 			for (int k = 0; k < Variant::VARIANT_MAX; k++) {
+				// Prevent generating for comparison with null.
+				if (Variant::Type(k) == Variant::NIL && (Variant::Operator(j) == Variant::OP_EQUAL || Variant::Operator(j) == Variant::OP_NOT_EQUAL)) {
+					continue;
+				}
+
 				Variant::Type rt = Variant::get_operator_return_type(Variant::Operator(j), Variant::Type(i), Variant::Type(k));
 				if (rt != Variant::NIL) { // Has operator.
 					// Skip String % operator as it's registered separately for each Variant arg type,