Browse Source

NULL to nullptr

Michael Ragazzon 6 years ago
parent
commit
cb347e1a38
100 changed files with 384 additions and 389 deletions
  1. 1 1
      Include/RmlUi/Controls/DataFormatter.h
  2. 1 1
      Include/RmlUi/Controls/ElementDataGridRow.h
  3. 1 1
      Include/RmlUi/Controls/ElementFormControlSelect.h
  4. 2 2
      Include/RmlUi/Core/BaseXMLParser.h
  5. 8 8
      Include/RmlUi/Core/Context.h
  6. 4 4
      Include/RmlUi/Core/Core.h
  7. 2 2
      Include/RmlUi/Core/Decorator.h
  8. 11 11
      Include/RmlUi/Core/Element.h
  9. 1 1
      Include/RmlUi/Core/ElementScroll.h
  10. 2 2
      Include/RmlUi/Core/ElementUtilities.h
  11. 9 9
      Include/RmlUi/Core/Factory.h
  12. 1 1
      Include/RmlUi/Core/FileInterface.h
  13. 2 2
      Include/RmlUi/Core/FontDatabase.h
  14. 1 1
      Include/RmlUi/Core/FontFamily.h
  15. 2 2
      Include/RmlUi/Core/FontGlyph.h
  16. 2 2
      Include/RmlUi/Core/FontProvider.h
  17. 1 1
      Include/RmlUi/Core/Geometry.h
  18. 2 2
      Include/RmlUi/Core/Lua/Interpreter.h
  19. 2 2
      Include/RmlUi/Core/Lua/LuaType.h
  20. 7 7
      Include/RmlUi/Core/Lua/LuaType.inl
  21. 1 1
      Include/RmlUi/Core/Lua/Utilities.h
  22. 1 1
      Include/RmlUi/Core/Property.h
  23. 2 2
      Include/RmlUi/Core/PropertySpecification.h
  24. 3 3
      Include/RmlUi/Core/RenderInterface.h
  25. 3 3
      Include/RmlUi/Core/StyleSheetSpecification.h
  26. 1 1
      Include/RmlUi/Core/Texture.h
  27. 0 5
      Include/RmlUi/Core/Types.h
  28. 1 1
      Include/RmlUi/Core/XMLNodeHandler.h
  29. 4 4
      Samples/basic/animation/src/main.cpp
  30. 4 4
      Samples/basic/benchmark/src/main.cpp
  31. 2 2
      Samples/basic/bitmapfont/src/main.cpp
  32. 3 3
      Samples/basic/customlog/src/SystemInterface.cpp
  33. 5 5
      Samples/basic/customlog/src/main.cpp
  34. 1 1
      Samples/basic/directx10/src/D3D10Effect.h
  35. 25 25
      Samples/basic/directx10/src/RenderInterfaceDirectx10.cpp
  36. 25 25
      Samples/basic/directx10/src/ShellRenderInterfaceExtensionsDirectX10_Win32.cpp
  37. 3 3
      Samples/basic/directx10/src/main.cpp
  38. 2 2
      Samples/basic/drag/src/DragListener.cpp
  39. 4 4
      Samples/basic/drag/src/Inventory.cpp
  40. 2 2
      Samples/basic/drag/src/main.cpp
  41. 2 2
      Samples/basic/loaddocument/src/main.cpp
  42. 1 1
      Samples/basic/sdl2/src/RenderInterfaceSDL2.cpp
  43. 1 1
      Samples/basic/sdl2/src/main.cpp
  44. 1 1
      Samples/basic/sfml2/src/RenderInterfaceSFML.cpp
  45. 1 1
      Samples/basic/sfml2/src/main.cpp
  46. 4 4
      Samples/basic/transform/src/main.cpp
  47. 6 6
      Samples/basic/treeview/src/FileSystem.cpp
  48. 2 2
      Samples/basic/treeview/src/main.cpp
  49. 1 1
      Samples/invaders/src/DecoratorDefender.h
  50. 1 1
      Samples/invaders/src/DecoratorInstancerDefender.h
  51. 1 1
      Samples/invaders/src/DecoratorInstancerStarfield.h
  52. 1 1
      Samples/invaders/src/DecoratorStarfield.h
  53. 8 8
      Samples/invaders/src/EventHandlerOptions.cpp
  54. 9 9
      Samples/invaders/src/EventManager.cpp
  55. 6 6
      Samples/invaders/src/Game.cpp
  56. 3 3
      Samples/invaders/src/HighScores.cpp
  57. 2 2
      Samples/invaders/src/main.cpp
  58. 1 1
      Samples/luainvaders/src/DecoratorDefender.h
  59. 1 1
      Samples/luainvaders/src/DecoratorInstancerDefender.h
  60. 1 1
      Samples/luainvaders/src/DecoratorInstancerStarfield.h
  61. 1 1
      Samples/luainvaders/src/DecoratorStarfield.h
  62. 6 6
      Samples/luainvaders/src/Game.cpp
  63. 3 3
      Samples/luainvaders/src/HighScores.cpp
  64. 5 5
      Samples/luainvaders/src/main.cpp
  65. 1 1
      Samples/shell/src/Input.cpp
  66. 1 1
      Samples/shell/src/ShellFileInterface.cpp
  67. 2 2
      Samples/shell/src/ShellRenderInterfaceOpenGL.cpp
  68. 8 8
      Samples/shell/src/macosx/InputMacOSX.cpp
  69. 11 11
      Samples/shell/src/macosx/ShellMacOSX.cpp
  70. 8 8
      Samples/shell/src/macosx/ShellRenderInterfaceExtensionsOpenGL_MacOSX.cpp
  71. 1 1
      Samples/shell/src/win32/InputWin32.cpp
  72. 9 9
      Samples/shell/src/win32/ShellRenderInterfaceExtensionsOpenGL_Win32.cpp
  73. 25 25
      Samples/shell/src/win32/ShellWin32.cpp
  74. 3 3
      Samples/shell/src/x11/InputX11.cpp
  75. 5 5
      Samples/shell/src/x11/ShellRenderInterfaceExtensionsOpenGL_X11.cpp
  76. 16 16
      Samples/shell/src/x11/ShellX11.cpp
  77. 1 1
      Samples/tutorial/datagrid/src/DecoratorDefender.h
  78. 3 3
      Samples/tutorial/datagrid/src/HighScores.cpp
  79. 2 2
      Samples/tutorial/datagrid/src/main.cpp
  80. 1 1
      Samples/tutorial/datagrid_tree/src/DecoratorDefender.h
  81. 3 3
      Samples/tutorial/datagrid_tree/src/HighScores.cpp
  82. 2 2
      Samples/tutorial/datagrid_tree/src/main.cpp
  83. 2 2
      Samples/tutorial/drag/src/main.cpp
  84. 2 2
      Samples/tutorial/template/src/main.cpp
  85. 2 2
      Source/Controls/DataFormatter.cpp
  86. 1 1
      Source/Controls/DataQuery.cpp
  87. 2 2
      Source/Controls/DataSource.cpp
  88. 2 2
      Source/Controls/DataSourceListener.cpp
  89. 2 2
      Source/Controls/ElementDataGrid.cpp
  90. 10 10
      Source/Controls/ElementDataGridRow.cpp
  91. 1 1
      Source/Controls/ElementForm.cpp
  92. 8 8
      Source/Controls/ElementFormControlDataSelect.cpp
  93. 5 5
      Source/Controls/ElementFormControlInput.cpp
  94. 9 9
      Source/Controls/ElementFormControlSelect.cpp
  95. 2 2
      Source/Controls/ElementTabSet.cpp
  96. 2 2
      Source/Controls/ElementTextSelection.cpp
  97. 5 5
      Source/Controls/InputTypeRadio.cpp
  98. 1 1
      Source/Controls/InputTypeSubmit.cpp
  99. 1 1
      Source/Controls/Lua/Controls.cpp
  100. 3 3
      Source/Controls/Lua/DataFormatter.cpp

+ 1 - 1
Include/RmlUi/Controls/DataFormatter.h

@@ -59,7 +59,7 @@ public:
 	/// @parameter [in] data_formatter_name The name of the data formatter to
 	/// be returned.
 	/// @return If the data formatter with the specified name has been
-	/// constructed, a pointer to it will be returned. Otherwise, NULL.
+	/// constructed, a pointer to it will be returned. Otherwise, nullptr.
 	static DataFormatter* GetDataFormatter(const Rml::Core::String& data_formatter_name);
 
 	/// Formats the raw results of a data source request into RML.

+ 1 - 1
Include/RmlUi/Controls/ElementDataGridRow.h

@@ -54,7 +54,7 @@ public:
 	ElementDataGridRow(const Rml::Core::String& tag);
 	virtual ~ElementDataGridRow();
 
-	void Initialise(ElementDataGrid* parent_grid, ElementDataGridRow* parent_row = NULL, int child_index = -1, ElementDataGridRow* header_row = NULL, int depth = -1);
+	void Initialise(ElementDataGrid* parent_grid, ElementDataGridRow* parent_row = nullptr, int child_index = -1, ElementDataGridRow* header_row = nullptr, int depth = -1);
 	void SetChildIndex(int child_index);
 	int GetDepth();
 

+ 1 - 1
Include/RmlUi/Controls/ElementFormControlSelect.h

@@ -69,7 +69,7 @@ public:
 
 	/// Returns one of the select control's option elements.
 	/// @param[in] The index of the desired option element.
-	/// @return The option element at the given index. This will be NULL if the index is out of bounds.
+	/// @return The option element at the given index. This will be nullptr if the index is out of bounds.
 	SelectOption* GetOption(int index);
 	/// Returns the number of options in the select control.
 	/// @return The number of options.

+ 2 - 2
Include/RmlUi/Core/BaseXMLParser.h

@@ -82,12 +82,12 @@ class RMLUICORE_API BaseXMLParser
 		bool ReadOpenTag();
 		bool ReadCloseTag();
 		bool ReadAttributes(XMLAttributes& attributes);
-		bool ReadCDATA(const char* terminator = NULL);
+		bool ReadCDATA(const char* terminator = nullptr);
 
 		// Reads from the stream until a complete word is found.
 		// @param[out] word Word thats been found
 		// @param[in] terminators List of characters that terminate the search
-		bool FindWord(String& word, const char* terminators = NULL);
+		bool FindWord(String& word, const char* terminators = nullptr);
 		// Reads from the stream until the given character set is found. All
 		// intervening characters will be returned in data.
 		bool FindString(const unsigned char* string, String& data);

+ 8 - 8
Include/RmlUi/Core/Context.h

@@ -92,19 +92,19 @@ public:
 
 	/// Creates a new, empty document and places it into this context.
 	/// @param[in] tag The document type to create.
-	/// @return The new document, or NULL if no document could be created. The document is returned with a reference owned by the caller.
+	/// @return The new document, or nullptr if no document could be created. The document is returned with a reference owned by the caller.
 	ElementDocument* CreateDocument(const String& tag = "body");
 	/// Load a document into the context.
 	/// @param[in] document_path The path to the document to load.
-	/// @return The loaded document, or NULL if no document was loaded. The document is returned with a reference owned by the caller.
+	/// @return The loaded document, or nullptr if no document was loaded. The document is returned with a reference owned by the caller.
 	ElementDocument* LoadDocument(const String& document_path);
 	/// Load a document into the context.
 	/// @param[in] document_stream The opened stream, ready to read.
-	/// @return The loaded document, or NULL if no document was loaded. The document is returned with a reference owned by the caller.
+	/// @return The loaded document, or nullptr if no document was loaded. The document is returned with a reference owned by the caller.
 	ElementDocument* LoadDocument(Stream* document_stream);
 	/// Load a document into the context.
 	/// @param[in] string The string containing the document RML.
-	/// @return The loaded document, or NULL if no document was loaded. The document is returned with a reference owned by the caller.
+	/// @return The loaded document, or nullptr if no document was loaded. The document is returned with a reference owned by the caller.
 	ElementDocument* LoadDocumentFromMemory(const String& string);
 	/// Unload the given document.
 	/// @param[in] document The document to unload.
@@ -119,11 +119,11 @@ public:
 
 	/// Returns the first document in the context with the given id.
 	/// @param[in] id The id of the desired document.
-	/// @return The document (if it was found), or NULL if no document exists with the ID. The document is returned with a borrowed reference.
+	/// @return The document (if it was found), or nullptr if no document exists with the ID. The document is returned with a borrowed reference.
 	ElementDocument* GetDocument(const String& id);
 	/// Returns a document in the context by index.
 	/// @param[in] index The index of the desired document.
-	/// @return The document (if one exists with this index), or NULL if the index was invalid. The document is returned with a borrowed reference.
+	/// @return The document (if one exists with this index), or nullptr if the index was invalid. The document is returned with a borrowed reference.
 	ElementDocument* GetDocument(int index);
 	/// Returns the number of documents in the context.
 	/// @return The number of documents in the context.
@@ -304,8 +304,8 @@ private:
 	// @param[in] point The point to test.
 	// @param[in] ignore_element If set, this element and its descendents will be ignored.
 	// @param[in] element Used internally.
-	// @return The element under the point, or NULL if nothing is.
-	Element* GetElementAtPoint(const Vector2f& point, const Element* ignore_element = NULL, Element* element = NULL);
+	// @return The element under the point, or nullptr if nothing is.
+	Element* GetElementAtPoint(const Vector2f& point, const Element* ignore_element = nullptr, Element* element = nullptr);
 
 	// Creates the drag clone from the given element. The old drag clone will be released if
 	// necessary.

+ 4 - 4
Include/RmlUi/Core/Core.h

@@ -129,9 +129,9 @@ RMLUICORE_API FileInterface* GetFileInterface();
 /// Creates a new element context.
 /// @param[in] name The new name of the context. This must be unique.
 /// @param[in] dimensions The initial dimensions of the new context.
-/// @param[in] render_interface The custom render interface to use, or NULL to use the default.
+/// @param[in] render_interface The custom render interface to use, or nullptr to use the default.
 /// @lifetime If specified, the render interface must be kept alive until after the context is destroyed or the call to Core::Shutdown.
-/// @return A non-owning pointer to the new context, or NULL if the context could not be created.
+/// @return A non-owning pointer to the new context, or nullptr if the context could not be created.
 RMLUICORE_API Context* CreateContext(const String& name, const Vector2i& dimensions, RenderInterface* render_interface = nullptr);
 /// Removes and destroys a context.
 /// @param[in] name The name of the context to remove.
@@ -139,11 +139,11 @@ RMLUICORE_API Context* CreateContext(const String& name, const Vector2i& dimensi
 RMLUICORE_API bool RemoveContext(const String& name);
 /// Fetches a previously constructed context by name.
 /// @param[in] name The name of the desired context.
-/// @return The desired context, or NULL if no context exists with the given name.
+/// @return The desired context, or nullptr if no context exists with the given name.
 RMLUICORE_API Context* GetContext(const String& name);
 /// Fetches a context by index.
 /// @param[in] index The index of the desired context. If this is outside of the valid range of contexts, it will be clamped.
-/// @return The requested context, or NULL if no contexts exist.
+/// @return The requested context, or nullptr if no contexts exist.
 RMLUICORE_API Context* GetContext(int index);
 /// Returns the number of active contexts.
 /// @return The total number of active RmlUi contexts.

+ 2 - 2
Include/RmlUi/Core/Decorator.h

@@ -57,7 +57,7 @@ public:
 
 	/// Called on a decorator to generate any required per-element data for a newly decorated element.
 	/// @param[in] element The newly decorated element.
-	/// @return A handle to a decorator-defined data handle, or NULL if none is needed for the element.
+	/// @return A handle to a decorator-defined data handle, or nullptr if none is needed for the element.
 	virtual DecoratorDataHandle GenerateElementData(Element* element) const = 0;
 	/// Called to release element data generated by this decorator.
 	/// @param[in] element_data The element data handle to release.
@@ -83,7 +83,7 @@ protected:
 	int AddTexture(const Texture& texture);
 	/// Returns one of the decorator's previously loaded textures.
 	/// @param[in] index The index of the desired texture.
-	/// @return The texture at the appropriate index, or NULL if the index was invalid.
+	/// @return The texture at the appropriate index, or nullptr if the index was invalid.
 	const Texture* GetTexture(int index = 0) const;
 
 private:

+ 11 - 11
Include/RmlUi/Core/Element.h

@@ -102,7 +102,7 @@ public:
 	String GetClassNames() const;
 	//@}
 
-	/// Returns the active style sheet for this element. This may be NULL.
+	/// Returns the active style sheet for this element. This may be nullptr.
 	/// @return The element's style sheet.
 	virtual const SharedPtr<StyleSheet>& GetStyleSheet() const;
 
@@ -206,7 +206,7 @@ public:
 	/// Returns one of this element's properties. If this element is not defined this property, or a parent cannot
 	/// be found that we can inherit the property from, the default value will be returned.
 	/// @param[in] name The name of the property to fetch the value for.
-	/// @return The value of this property for this element, or NULL if no property exists with the given name.
+	/// @return The value of this property for this element, or nullptr if no property exists with the given name.
 	const Property* GetProperty(const String& name);		
 	const Property* GetProperty(PropertyId id);		
 	/// Returns the values of one of this element's properties.		
@@ -214,14 +214,14 @@ public:
 	/// @return The value of this property.
 	template < typename T >
 	T GetProperty(const String& name);
-	/// Returns one of this element's properties. If this element is not defined this property, NULL will be
+	/// Returns one of this element's properties. If this element is not defined this property, nullptr will be
 	/// returned.
 	/// @param[in] name The name of the property to fetch the value for.
-	/// @return The value of this property for this element, or NULL if this property has not been explicitly defined for this element.
+	/// @return The value of this property for this element, or nullptr if this property has not been explicitly defined for this element.
 	const Property* GetLocalProperty(const String& name);
 	const Property* GetLocalProperty(PropertyId id);
 	/// Returns the local style properties, excluding any properties from local class.
-	/// @return The local properties for this element, or NULL if no properties defined
+	/// @return The local properties for this element, or nullptr if no properties defined
 	const PropertyMap& GetLocalStyleProperties();
 	/// Resolves a property with units of length or percentage to 'px'. Percentages are resolved by scaling the base value.
 	/// @param[in] name The property to resolve the value for.
@@ -296,7 +296,7 @@ public:
 	void SetAttribute(const String& name, const T& value);
 	/// Gets the specified attribute.
 	/// @param[in] name Name of the attribute to retrieve.
-	/// @return A variant representing the attribute, or NULL if the attribute doesn't exist.
+	/// @return A variant representing the attribute, or nullptr if the attribute doesn't exist.
 	Variant* GetAttribute(const String& name);
 	/// Gets the specified attribute, with default value.
 	/// @param[in] name Name of the attribute to retrieve.
@@ -416,17 +416,17 @@ public:
 	Element* GetParentNode() const;
 
 	/// Gets the element immediately following this one in the tree.
-	/// @return This element's next sibling element, or NULL if there is no sibling element.
+	/// @return This element's next sibling element, or nullptr if there is no sibling element.
 	Element* GetNextSibling() const;
 	/// Gets the element immediately preceding this one in the tree.
-	/// @return This element's previous sibling element, or NULL if there is no sibling element.
+	/// @return This element's previous sibling element, or nullptr if there is no sibling element.
 	Element* GetPreviousSibling() const;
 
 	/// Returns the first child of this element.
-	/// @return This element's first child, or NULL if it contains no children.
+	/// @return This element's first child, or nullptr if it contains no children.
 	Element* GetFirstChild() const;
 	/// Gets the last child of this element.
-	/// @return This element's last child, or NULL if it contains no children.
+	/// @return This element's last child, or nullptr if it contains no children.
 	Element* GetLastChild() const;
 	/// Get the child element at the given index.
 	/// @param[in] index Index of child to get.
@@ -513,7 +513,7 @@ public:
 
 	/// Get a child element by its ID.
 	/// @param[in] id Id of the the child element
-	/// @return The child of this element with the given ID, or NULL if no such child exists.
+	/// @return The child of this element with the given ID, or nullptr if no such child exists.
 	Element* GetElementById(const String& id);
 	/// Get all descendant elements with the given tag.
 	/// @param[out] elements Resulting elements.

+ 1 - 1
Include/RmlUi/Core/ElementScroll.h

@@ -72,7 +72,7 @@ public:
 
 	/// Returns one of the scrollbar elements.
 	/// @param[in] orientation Which scrollbar to return.
-	/// @return The requested scrollbar, or NULL if it does not exist.
+	/// @return The requested scrollbar, or nullptr if it does not exist.
 	Element* GetScrollbar(Orientation orientation);
 	/// Returns the size, in pixels, of one of the scrollbars; for a vertical scrollbar, this is width, for a horizontal scrollbar, this is height.
 	/// @param[in] orientation Which scrollbar (vertical or horizontal) to query.

+ 2 - 2
Include/RmlUi/Core/ElementUtilities.h

@@ -82,7 +82,7 @@ public:
 
 	/// Returns an element's font face.
 	/// @param[in] element The element to determine the font face for.
-	/// @return The element's font face. This will be NULL if no valid RCSS font styles have been set up for this element.
+	/// @return The element's font face. This will be nullptr if no valid RCSS font styles have been set up for this element.
 	static SharedPtr<FontFaceHandle> GetFontFaceHandle(const Style::ComputedValues& computed_values);
 	/// Returns an element's density-independent pixel ratio, defined by it's context
 	/// @param[in] element The element to determine the density-independent pixel ratio for.
@@ -108,7 +108,7 @@ public:
 	/// @param[in] element The element to generate the clipping region from.
 	/// @param[in] context The context of the element; if this is not supplied, it will be derived from the element.
 	/// @return The visibility of the given element within its clipping region.
-	static bool SetClippingRegion(Element* element, Context* context = NULL);
+	static bool SetClippingRegion(Element* element, Context* context = nullptr);
 	/// Applies the clip region from the render interface to the renderer
 	/// @param[in] context The context to read the clip region from
 	/// @param[in] render_interface The render interface to update.

+ 9 - 9
Include/RmlUi/Core/Factory.h

@@ -77,7 +77,7 @@ public:
 	static void RegisterContextInstancer(ContextInstancer* instancer);
 	/// Instances a new context.
 	/// @param[in] name The name of the new context.
-	/// @return The new context, or NULL if no context could be created.
+	/// @return The new context, or nullptr if no context could be created.
 	static ContextPtr InstanceContext(const String& name);
 
 	/// Registers a non-owning pointer to the element instancer that will be used to instance an element when the specified tag is encountered.
@@ -87,14 +87,14 @@ public:
 	static void RegisterElementInstancer(const String& name, ElementInstancer* instancer);
 	/// Returns the element instancer for the specified tag.
 	/// @param[in] tag Name of the tag to get the instancer for.
-	/// @return The requested element instancer, or NULL if no such instancer is registered.
+	/// @return The requested element instancer, or nullptr if no such instancer is registered.
 	static ElementInstancer* GetElementInstancer(const String& tag);
 	/// Instances a single element.
-	/// @param[in] parent The parent of the new element, or NULL for a root tag.
+	/// @param[in] parent The parent of the new element, or nullptr for a root tag.
 	/// @param[in] instancer The name of the instancer to create the element with.
 	/// @param[in] tag The tag of the element to be instanced.
 	/// @param[in] attributes The attributes to instance the element with.
-	/// @return The instanced element, or NULL if the instancing failed.
+	/// @return The instanced element, or nullptr if the instancing failed.
 	static ElementPtr InstanceElement(Element* parent, const String& instancer, const String& tag, const XMLAttributes& attributes);
 
 	/// Instances a single text element containing a string. The string is assumed to contain no RML markup, but will
@@ -111,29 +111,29 @@ public:
 	/// Instances a document from a stream.
 	/// @param[in] context The context that is creating the document.
 	/// @param[in] stream The stream to instance from.
-	/// @return The instanced document, or NULL if an error occurred.
+	/// @return The instanced document, or nullptr if an error occurred.
 	static ElementPtr InstanceDocumentStream(Rml::Core::Context* context, Stream* stream);
 
 	/// Registers a non-owning pointer to an instancer that will be used to instance decorators.
 	/// @param[in] name The name of the decorator the instancer will be called for.
 	/// @param[in] instancer The instancer to call when the decorator name is encountered.
 	/// @lifetime The instancer must be kept alive until after the call to Core::Shutdown.
-	/// @return The added instancer if the registration was successful, NULL otherwise.
+	/// @return The added instancer if the registration was successful, nullptr otherwise.
 	static void RegisterDecoratorInstancer(const String& name, DecoratorInstancer* instancer);
 	/// Retrieves a decorator instancer registered with the factory.
 	/// @param[in] name The name of the desired decorator type.
-	/// @return The decorator instancer it it exists, NULL otherwise.
+	/// @return The decorator instancer it it exists, nullptr otherwise.
 	static DecoratorInstancer* GetDecoratorInstancer(const String& name);
 
 	/// Registers a non-owning pointer to an instancer that will be used to instance font effects.
 	/// @param[in] name The name of the font effect the instancer will be called for.
 	/// @param[in] instancer The instancer to call when the font effect name is encountered.
 	/// @lifetime The instancer must be kept alive until after the call to Core::Shutdown.
-	/// @return The added instancer if the registration was successful, NULL otherwise.
+	/// @return The added instancer if the registration was successful, nullptr otherwise.
 	static void RegisterFontEffectInstancer(const String& name, FontEffectInstancer* instancer);
 	/// Retrieves a font-effect instancer registered with the factory.
 	/// @param[in] name The name of the desired font-effect type.
-	/// @return The font-effect instancer it it exists, NULL otherwise.
+	/// @return The font-effect instancer it it exists, nullptr otherwise.
 	static FontEffectInstancer* GetFontEffectInstancer(const String& name);
 
 	/// Creates a style sheet from a user-generated string.

+ 1 - 1
Include/RmlUi/Core/FileInterface.h

@@ -54,7 +54,7 @@ public:
 
 	/// Opens a file.
 	/// @param file The file handle to write to.
-	/// @return A valid file handle, or NULL on failure
+	/// @return A valid file handle, or nullptr on failure
 	virtual FileHandle Open(const String& path) = 0;
 	/// Closes a previously opened file.
 	/// @param file The file handle previously opened through Open().

+ 2 - 2
Include/RmlUi/Core/FontDatabase.h

@@ -87,14 +87,14 @@ public:
     static bool LoadFontFace(FontProviderType font_provider_type, const byte* data, int data_length, const String& family, Font::Style style, Font::Weight weight);
 
 	/// Returns a handle to a font face that can be used to position and render text. This will return the closest match
-	/// it can find, but in the event a font family is requested that does not exist, NULL will be returned instead of a
+	/// it can find, but in the event a font family is requested that does not exist, nullptr will be returned instead of a
 	/// valid handle.
 	/// @param[in] family The family of the desired font handle.
 	/// @param[in] charset The set of characters required in the font face, as a comma-separated list of unicode ranges.
 	/// @param[in] style The style of the desired font handle.
 	/// @param[in] weight The weight of the desired font handle.
 	/// @param[in] size The size of desired handle, in points.
-	/// @return A valid handle if a matching (or closely matching) font face was found, NULL otherwise.
+	/// @return A valid handle if a matching (or closely matching) font face was found, nullptr otherwise.
 	static SharedPtr<FontFaceHandle> GetFontFaceHandle(const String& family, const String& charset, Font::Style style, Font::Weight weight, int size);
 
     static void AddFontProvider(FontProvider * provider);

+ 1 - 1
Include/RmlUi/Core/FontFamily.h

@@ -61,7 +61,7 @@ public:
 	/// @param[in] style The style of the desired handle.
 	/// @param[in] weight The weight of the desired handle.
 	/// @param[in] size The size of desired handle, in points.
-	/// @return A valid handle if a matching (or closely matching) font face was found, NULL otherwise.
+	/// @return A valid handle if a matching (or closely matching) font face was found, nullptr otherwise.
 	SharedPtr<FontFaceHandle> GetFaceHandle(const String& charset, Font::Style style, Font::Weight weight, int size);
 
 protected:

+ 2 - 2
Include/RmlUi/Core/FontGlyph.h

@@ -43,7 +43,7 @@ namespace Core {
 class FontGlyph
 {
 public:
-	FontGlyph() : character(0), dimensions(0,0), bearing(0,0), advance(0), bitmap_data(NULL),
+	FontGlyph() : character(0), dimensions(0,0), bearing(0,0), advance(0), bitmap_data(nullptr),
 		bitmap_dimensions(0,0)
 	{
 	}
@@ -61,7 +61,7 @@ public:
 	int advance;
 
 	/// 8-bit opacity information for the glyph's bitmap. The size of the data is given by the
-	/// dimensions, below. This will be NULL if the glyph has no bitmap data.
+	/// dimensions, below. This will be nullptr if the glyph has no bitmap data.
 	byte* bitmap_data;
 	/// The dimensions of the glyph's bitmap.
 	Vector2i bitmap_dimensions;

+ 2 - 2
Include/RmlUi/Core/FontProvider.h

@@ -49,14 +49,14 @@ class RMLUICORE_API FontProvider
 public:
 
     /// Returns a handle to a font face that can be used to position and render text. This will return the closest match
-    /// it can find, but in the event a font family is requested that does not exist, NULL will be returned instead of a
+    /// it can find, but in the event a font family is requested that does not exist, nullptr will be returned instead of a
     /// valid handle.
     /// @param[in] family The family of the desired font handle.
     /// @param[in] charset The set of characters required in the font face, as a comma-separated list of unicode ranges.
     /// @param[in] style The style of the desired font handle.
     /// @param[in] weight The weight of the desired font handle.
     /// @param[in] size The size of desired handle, in points.
-    /// @return A valid handle if a matching (or closely matching) font face was found, NULL otherwise.
+    /// @return A valid handle if a matching (or closely matching) font face was found, nullptr otherwise.
 	SharedPtr<FontFaceHandle> GetFontFaceHandle(const String& family, const String& charset, Font::Style style, Font::Weight weight, int size);
 
 protected:

+ 1 - 1
Include/RmlUi/Core/Geometry.h

@@ -49,7 +49,7 @@ struct Texture;
 class RMLUICORE_API Geometry
 {
 public:
-	Geometry(Element* host_element = NULL);
+	Geometry(Element* host_element = nullptr);
 	Geometry(Context* host_context);
 	~Geometry();
 

+ 2 - 2
Include/RmlUi/Core/Lua/Interpreter.h

@@ -93,7 +93,7 @@ public:
     static lua_State* GetLuaState();
 
     /** Creates the plugin. 
-	@remark This is equivilent to calling Initialise(NULL).
+	@remark This is equivilent to calling Initialise(nullptr).
       */
     static void Initialise();
     /** Creates the plugin and adds RmlUi to an existing Lua context if one is provided.
@@ -101,7 +101,7 @@ public:
 	 Interpreter::Shutdown() calles lua_close on the lua_State pointer provided here, do not call Interpreter::Shutdown if you
 	 must call lua_close yourself or if you need to continue to use the lua_State pointer provided here.  Internally, it calls
 	 Interpreter::Startup() and registers the "body" tag to generate a LuaDocument rather than a Rml::Core::ElementDocument.
-	 If the argument provided is NULL, a Lua context is created automatically instead. */
+	 If the argument provided is nullptr, a Lua context is created automatically instead. */
     static void Initialise(lua_State *_L);
 
     /** Stops the plugin by calling lua_close

+ 2 - 2
Include/RmlUi/Core/Lua/LuaType.h

@@ -51,7 +51,7 @@
 #define LUASETTER(type,varname) { #varname, type##SetAttr##varname },
 
 #define CHECK_BOOL(L,narg) (lua_toboolean((L),(narg)) > 0 ? true : false )
-#define LUACHECKOBJ(obj) if((obj) == NULL) { lua_pushnil(L); return 1; }
+#define LUACHECKOBJ(obj) if((obj) == nullptr) { lua_pushnil(L); return 1; }
 
  /** Used to remove repetitive typing at the cost of flexibility. When you use this, you @em must have 
  functions with the same name as defined in the macro. For example, if you used @c Element as type, you would
@@ -149,7 +149,7 @@ public:
     static inline int push(lua_State *L, T* obj, bool gc=false);
     /** Statically casts the item at the position on the Lua stack
     @param narg[in] Position of the item to cast on the Lua stack
-    @return A pointer to an object of type T or @c NULL   */
+    @return A pointer to an object of type T or @c nullptr   */
     static inline T* check(lua_State* L, int narg);
 
     /** For calling a C closure with upvalues. Used by the functions defined by RegType

+ 7 - 7
Include/RmlUi/Core/Lua/LuaType.inl

@@ -88,7 +88,7 @@ int LuaType<T>::push(lua_State *L, T* obj, bool gc)
     int mt = lua_gettop(L); //mt = 1
     T** ptrHold = (T**)lua_newuserdata(L,sizeof(T**)); //->[2] = empty userdata
     int ud = lua_gettop(L); //ud = 2
-    if(ptrHold != NULL)
+    if(ptrHold != nullptr)
     {
         *ptrHold = obj; 
         lua_pushvalue(L, mt); // ->[3] = copy of [1]
@@ -136,8 +136,8 @@ template<typename T>
 T* LuaType<T>::check(lua_State* L, int narg)
 {
     T** ptrHold = static_cast<T**>(lua_touserdata(L,narg));
-    if(ptrHold == NULL)
-        return NULL;
+    if(ptrHold == nullptr)
+        return nullptr;
     return (*ptrHold);
 }
 
@@ -152,9 +152,9 @@ int LuaType<T>::thunk(lua_State* L)
     lua_remove(L, 1);  // remove self so member function args start at index 1
     // get member function from upvalue
     RegType *l = static_cast<RegType*>(lua_touserdata(L, lua_upvalueindex(1)));
-    //at the moment, there isn't a case where NULL is acceptable to be used in the function, so check
+    //at the moment, there isn't a case where nullptr is acceptable to be used in the function, so check
     //for it here, rather than individually for each function
-    if(obj == NULL)
+    if(obj == nullptr)
     {
         lua_pushnil(L);
         return 1;
@@ -176,7 +176,7 @@ template<typename T>
 int LuaType<T>::gc_T(lua_State* L)
 {
     T * obj = check(L,1); //[1] = this userdata
-    if(obj == NULL)
+    if(obj == nullptr)
         return 0;
     if(IsReferenceCounted<T>())
     {
@@ -197,7 +197,7 @@ int LuaType<T>::gc_T(lua_State* L)
             if(!IsReferenceCounted<T>())
             {
                 delete obj;
-                obj = NULL;
+                obj = nullptr;
             }
         }
     }

+ 1 - 1
Include/RmlUi/Core/Lua/Utilities.h

@@ -49,7 +49,7 @@ void RMLUILUA_API PushVariant(lua_State* L, const Variant* var);
 @param place A string that will be printed to the log right before the error message, seperated by a space. Set
 this when you would get no information about where the error happens.
 @relates Rml::Core::Lua::Interpreter   */
-void RMLUILUA_API Report(lua_State* L = NULL, const Rml::Core::String& place = "");
+void RMLUILUA_API Report(lua_State* L = nullptr, const Rml::Core::String& place = "");
 
 //Helper function, so that the types don't have to define individual functions themselves
 // to fill the Elements.As table

+ 1 - 1
Include/RmlUi/Core/Property.h

@@ -92,7 +92,7 @@ public:
 	template < typename PropertyType >
 	Property(PropertyType value, Unit unit, int specificity = -1) : value(value), unit(unit), specificity(specificity)
 	{
-		definition = NULL;
+		definition = nullptr;
 		parser_index = -1;
 
 		source_line_number = 0;

+ 2 - 2
Include/RmlUi/Core/PropertySpecification.h

@@ -167,7 +167,7 @@ public:
 	PropertyDefinition& RegisterProperty(const String& property_name, const String& default_value, bool inherited, bool forces_layout, PropertyId id = PropertyId::Invalid);
 	/// Returns a property definition.
 	/// @param[in] id The id of the desired property.
-	/// @return The appropriate property definition if it could be found, NULL otherwise.
+	/// @return The appropriate property definition if it could be found, nullptr otherwise.
 	const PropertyDefinition* GetProperty(PropertyId id) const;
 	const PropertyDefinition* GetProperty(const String& property_name) const;
 
@@ -188,7 +188,7 @@ public:
 	ShorthandId RegisterShorthand(const String& shorthand_name, const String& property_names, ShorthandType type, ShorthandId id = ShorthandId::Invalid);
 	/// Returns a shorthand definition.
 	/// @param[in] shorthand_name The name of the desired shorthand.
-	/// @return The appropriate shorthand definition if it could be found, NULL otherwise.
+	/// @return The appropriate shorthand definition if it could be found, nullptr otherwise.
 	const ShorthandDefinition* GetShorthand(ShorthandId id) const;
 	const ShorthandDefinition* GetShorthand(const String& shorthand_name) const;
 

+ 3 - 3
Include/RmlUi/Core/RenderInterface.h

@@ -59,18 +59,18 @@ public:
 	/// @param[in] num_vertices The number of vertices passed to the function.
 	/// @param[in] indices The geometry's index data.
 	/// @param[in] num_indices The number of indices passed to the function. This will always be a multiple of three.
-	/// @param[in] texture The texture to be applied to the geometry. This may be NULL, in which case the geometry is untextured.
+	/// @param[in] texture The texture to be applied to the geometry. This may be nullptr, in which case the geometry is untextured.
 	/// @param[in] translation The translation to apply to the geometry.
 	virtual void RenderGeometry(Vertex* vertices, int num_vertices, int* indices, int num_indices, TextureHandle texture, const Vector2f& translation) = 0;
 
 	/// Called by RmlUi when it wants to compile geometry it believes will be static for the forseeable future.
 	/// If supported, this should be return a pointer to an optimised, application-specific version of the data. If
-	/// not, do not override the function or return NULL; the simpler RenderGeometry() will be called instead.
+	/// not, do not override the function or return nullptr; the simpler RenderGeometry() will be called instead.
 	/// @param[in] vertices The geometry's vertex data.
 	/// @param[in] num_vertices The number of vertices passed to the function.
 	/// @param[in] indices The geometry's index data.
 	/// @param[in] num_indices The number of indices passed to the function. This will always be a multiple of three.
-	/// @param[in] texture The texture to be applied to the geometry. This may be NULL, in which case the geometry is untextured.
+	/// @param[in] texture The texture to be applied to the geometry. This may be nullptr, in which case the geometry is untextured.
 	/// @return The application-specific compiled geometry. Compiled geometry will be stored and rendered using RenderCompiledGeometry() in future calls, and released with ReleaseCompiledGeometry() when it is no longer needed.
 	virtual CompiledGeometryHandle CompileGeometry(Vertex* vertices, int num_vertices, int* indices, int num_indices, TextureHandle texture);
 	/// Called by RmlUi when it wants to render application-compiled geometry.

+ 3 - 3
Include/RmlUi/Core/StyleSheetSpecification.h

@@ -59,7 +59,7 @@ public:
 	static bool RegisterParser(const String& parser_name, PropertyParser* parser);
 	/// Returns the parser registered with a specific name.
 	/// @param[in] parser_name The name of the desired parser.
-	/// @return The parser registered under the given name, or NULL if no such parser exists.
+	/// @return The parser registered under the given name, or nullptr if no such parser exists.
 	static PropertyParser* GetParser(const String& parser_name);
 
 	/// Registers a custom property with a new definition.
@@ -71,7 +71,7 @@ public:
 	static PropertyDefinition& RegisterProperty(const String& property_name, const String& default_value, bool inherited, bool forces_layout = false);
 	/// Returns a property definition.
 	/// @param[in] property_name The name of the desired property.
-	/// @return The appropriate property definition if it could be found, NULL otherwise.
+	/// @return The appropriate property definition if it could be found, nullptr otherwise.
 	static const PropertyDefinition* GetProperty(const String& property_name);
 	static const PropertyDefinition* GetProperty(PropertyId id);
 
@@ -91,7 +91,7 @@ public:
 	static ShorthandId RegisterShorthand(const String& shorthand_name, const String& property_names, ShorthandType type);
 	/// Returns a shorthand definition.
 	/// @param[in] shorthand_name The name of the desired shorthand.
-	/// @return The appropriate shorthand definition if it could be found, NULL otherwise.
+	/// @return The appropriate shorthand definition if it could be found, nullptr otherwise.
 	static const ShorthandDefinition* GetShorthand(const String& shorthand_name);
 	static const ShorthandDefinition* GetShorthand(ShorthandId id);
 

+ 1 - 1
Include/RmlUi/Core/Texture.h

@@ -58,7 +58,7 @@ public:
 	const String& GetSource() const;
 	/// Returns the texture's handle.
 	/// @param[in] The render interface that is requesting the handle.
-	/// @return The texture's handle. This will be NULL if the texture isn't loaded.
+	/// @return The texture's handle. This will be nullptr if the texture isn't loaded.
 	TextureHandle GetHandle(RenderInterface* render_interface) const;
 	/// Returns the texture's dimensions.
 	/// @param[in] The render interface that is requesting the dimensions.

+ 0 - 5
Include/RmlUi/Core/Types.h

@@ -29,11 +29,6 @@
 #ifndef RMLUICORETYPES_H
 #define RMLUICORETYPES_H
 
-// Define NULL as zero.
-#if !defined NULL
-#define NULL 0
-#endif
-
 #include <float.h>
 #include <limits.h>
 #include <string>

+ 1 - 1
Include/RmlUi/Core/XMLNodeHandler.h

@@ -54,7 +54,7 @@ public:
 	/// @param parser The parser executing the parse.
 	/// @param name The XML tag name.
 	/// @param attributes The tag attributes.
-	/// @return The new element, may be NULL if no element was created.
+	/// @return The new element, may be nullptr if no element was created.
 	virtual Element* ElementStart(XMLParser* parser, const String& name, const XMLAttributes& attributes) = 0;
 
 	/// Called when an element is closed.

+ 4 - 4
Samples/basic/animation/src/main.cpp

@@ -44,7 +44,7 @@ public:
 	{
 		using namespace Rml::Core;
 		document = context->LoadDocument("basic/animation/data/animation.rml");
-		if (document != NULL)
+		if (document != nullptr)
 		{
 			{
 				document->GetElementById("title")->SetInnerRML(title);
@@ -139,9 +139,9 @@ private:
 };
 
 
-Rml::Core::Context* context = NULL;
+Rml::Core::Context* context = nullptr;
 ShellRenderInterfaceExtensions *shell_renderer;
-DemoWindow* window = NULL;
+DemoWindow* window = nullptr;
 
 bool pause_loop = false;
 bool single_loop = false;
@@ -346,7 +346,7 @@ int main(int RMLUI_UNUSED_PARAMETER(argc), char** RMLUI_UNUSED_PARAMETER(argv))
 
 	// Create the main RmlUi context and set it on the shell's input layer.
 	context = Rml::Core::CreateContext("main", Rml::Core::Vector2i(width, height));
-	if (context == NULL)
+	if (context == nullptr)
 	{
 		Rml::Core::Shutdown();
 		Shell::Shutdown();

+ 4 - 4
Samples/basic/benchmark/src/main.cpp

@@ -41,7 +41,7 @@ public:
 	{
 		using namespace Rml::Core;
 		document = context->LoadDocument("basic/benchmark/data/benchmark.rml");
-		if (document != NULL)
+		if (document != nullptr)
 		{
 			{
 				document->GetElementById("title")->SetInnerRML(title);
@@ -149,9 +149,9 @@ private:
 };
 
 
-Rml::Core::Context* context = NULL;
+Rml::Core::Context* context = nullptr;
 ShellRenderInterfaceExtensions *shell_renderer;
-DemoWindow* window = NULL;
+DemoWindow* window = nullptr;
 
 bool pause_loop = false;
 bool single_loop = false;
@@ -306,7 +306,7 @@ int main(int RMLUI_UNUSED_PARAMETER(argc), char** RMLUI_UNUSED_PARAMETER(argv))
 
 	// Create the main RmlUi context and set it on the shell's input layer.
 	context = Rml::Core::CreateContext("main", Rml::Core::Vector2i(width, height));
-	if (context == NULL)
+	if (context == nullptr)
 	{
 		Rml::Core::Shutdown();
 		Shell::Shutdown();

+ 2 - 2
Samples/basic/bitmapfont/src/main.cpp

@@ -32,7 +32,7 @@
 #include <Shell.h>
 #include <ShellRenderInterfaceOpenGL.h>
 
-Rml::Core::Context* context = NULL;
+Rml::Core::Context* context = nullptr;
 
 ShellRenderInterfaceExtensions *shell_renderer;
 
@@ -91,7 +91,7 @@ int main(int RMLUI_UNUSED_PARAMETER(argc), char** RMLUI_UNUSED_PARAMETER(argv))
 
 	// Create the main RmlUi context and set it on the shell's input layer.
 	context = Rml::Core::CreateContext("main", Rml::Core::Vector2i(window_width, window_height));
-	if (context == NULL)
+	if (context == nullptr)
 	{
 		Rml::Core::Shutdown();
 		Shell::Shutdown();

+ 3 - 3
Samples/basic/customlog/src/SystemInterface.cpp

@@ -41,7 +41,7 @@ SystemInterface::SystemInterface()
 
 SystemInterface::~SystemInterface()
 {
-	if (fp != NULL)
+	if (fp != nullptr)
 		fclose(fp);
 }
 
@@ -53,7 +53,7 @@ double SystemInterface::GetElapsedTime()
 
 bool SystemInterface::LogMessage(Rml::Core::Log::Type type, const Rml::Core::String& message)
 {
-	if (fp != NULL)
+	if (fp != nullptr)
 	{
 		// Select a prefix appropriate for the severity of the message.
 		const char* prefix;
@@ -83,7 +83,7 @@ bool SystemInterface::LogMessage(Rml::Core::Log::Type type, const Rml::Core::Str
 			Rml::Core::String assert_message = Rml::Core::CreateString(1024, "%s\nWould you like to interrupt execution?", message.c_str());
 
 			// Return TRUE if the user presses NO (continue execution)
-			return MessageBox(NULL, assert_message.c_str(), "Assertion Failure", MB_YESNO | MB_ICONSTOP | MB_DEFBUTTON2 | MB_SYSTEMMODAL) == IDNO;
+			return MessageBox(nullptr, assert_message.c_str(), "Assertion Failure", MB_YESNO | MB_ICONSTOP | MB_DEFBUTTON2 | MB_SYSTEMMODAL) == IDNO;
 		}
 #endif
 	}

+ 5 - 5
Samples/basic/customlog/src/main.cpp

@@ -33,7 +33,7 @@
 #include <ShellRenderInterfaceOpenGL.h>
 #include "SystemInterface.h"
 
-Rml::Core::Context* context = NULL;
+Rml::Core::Context* context = nullptr;
 
 ShellRenderInterfaceExtensions *shell_renderer;
 
@@ -93,7 +93,7 @@ int main(int RMLUI_UNUSED_PARAMETER(argc), char** RMLUI_UNUSED_PARAMETER(argv))
 
 	// Create the main RmlUi context and set it on the shell's input layer.
 	context = Rml::Core::CreateContext("main", Rml::Core::Vector2i(window_width, window_height));
-	if (context == NULL)
+	if (context == nullptr)
 	{
 		Rml::Core::Shutdown();
 		Shell::Shutdown();
@@ -108,15 +108,15 @@ int main(int RMLUI_UNUSED_PARAMETER(argc), char** RMLUI_UNUSED_PARAMETER(argv))
 
 	// Load a non-existent document to spawn an error message.
 	Rml::Core::ElementDocument* invalid_document = context->LoadDocument("assets/invalid.rml");
-	RMLUI_ASSERTMSG(invalid_document != NULL, "Testing ASSERT logging.");
-	if (invalid_document != NULL)
+	RMLUI_ASSERTMSG(invalid_document != nullptr, "Testing ASSERT logging.");
+	if (invalid_document != nullptr)
 	{
 		invalid_document->Close();
 	}
 
 	// Load and show the demo document.
 	Rml::Core::ElementDocument* document = context->LoadDocument("assets/demo.rml");
-	if (document != NULL)
+	if (document != nullptr)
 	{
 		document->Show();
 	}

+ 1 - 1
Samples/basic/directx10/src/D3D10Effect.h

@@ -48,7 +48,7 @@ const char * pEffectData="float4x4 matWorld;"
     "{" 
 	"SetBlendState(AlphaBlendingOn, float4(0.0f, 0.0f, 0.0f, 0.0f), 0xFFFFFFFF);"
     "SetVertexShader( CompileShader( vs_4_0, VS() ) );" 
-    "SetGeometryShader( NULL );" 
+    "SetGeometryShader( nullptr );" 
     "SetPixelShader( CompileShader( ps_4_0, PS() ) ); " 
     "}"
 "}";

+ 25 - 25
Samples/basic/directx10/src/RenderInterfaceDirectx10.cpp

@@ -46,29 +46,29 @@ const D3D10_INPUT_ELEMENT_DESC layout[] =
 //The constructor of the render
 RenderInterfaceDirectX10::RenderInterfaceDirectX10(void)
 {
-	m_rmlui_context = NULL;
-	m_pD3D10Device = NULL;
+	m_rmlui_context = nullptr;
+	m_pD3D10Device = nullptr;
 
-	m_pEffect = NULL;
-	m_pTechnique = NULL;
-	m_pVertexLayout = NULL;
+	m_pEffect = nullptr;
+	m_pTechnique = nullptr;
+	m_pVertexLayout = nullptr;
 
-	m_pSwapChain = NULL;
-	m_pRenderTargetView = NULL;
+	m_pSwapChain = nullptr;
+	m_pRenderTargetView = nullptr;
 
-	m_pProjectionMatrixVariable = NULL;
-	m_pWorldMatrixVariable = NULL;
-	m_pDiffuseTextureVariable = NULL;
+	m_pProjectionMatrixVariable = nullptr;
+	m_pWorldMatrixVariable = nullptr;
+	m_pDiffuseTextureVariable = nullptr;
 
-	m_pScissorTestDisable = NULL;
-	m_pScissorTestEnable = NULL;
+	m_pScissorTestDisable = nullptr;
+	m_pScissorTestEnable = nullptr;
 }
 
 //Loads the effect from memory and retrieves initial variables from the effect
 void RenderInterfaceDirectX10::setupEffect()
 {
 	//The pass we are going to use
-	ID3D10EffectPass *pass=NULL;
+	ID3D10EffectPass *pass=nullptr;
 	DWORD dwShaderFlags = 0;
 	#if defined( DEBUG ) || defined( _DEBUG )
 		// Set the D3D10_SHADER_DEBUG flag to embed debug information in the shaders.
@@ -79,7 +79,7 @@ void RenderInterfaceDirectX10::setupEffect()
 
 	#endif
 	//Create our effect from Memory
-	if (FAILED(D3DX10CreateEffectFromMemory((void*)pEffectData,strlen(pEffectData),"DefaultEffect",NULL,NULL,"fx_4_0",dwShaderFlags,0,m_pD3D10Device,NULL,NULL,&m_pEffect,NULL,NULL)))
+	if (FAILED(D3DX10CreateEffectFromMemory((void*)pEffectData,strlen(pEffectData),"DefaultEffect",nullptr,nullptr,"fx_4_0",dwShaderFlags,0,m_pD3D10Device,nullptr,nullptr,&m_pEffect,nullptr,nullptr)))
 	{
 		//Log error
 		Rml::Core::Log::Message(Rml::Core::Log::LT_ERROR, "Can't create default effect for rendering, graphics card may not support Shader Model 4");
@@ -111,20 +111,20 @@ RenderInterfaceDirectX10::~RenderInterfaceDirectX10()
 	if (m_pVertexLayout)
 	{
 		m_pVertexLayout->Release();
-		m_pVertexLayout = NULL;
+		m_pVertexLayout = nullptr;
 	}
 	if (m_pEffect)
 	{
 		m_pEffect->Release();
-		m_pEffect = NULL;
+		m_pEffect = nullptr;
 	}
 	if (m_pScissorTestDisable){
 		m_pScissorTestDisable->Release();
-		m_pScissorTestDisable = NULL;
+		m_pScissorTestDisable = nullptr;
 	}
 	if (m_pScissorTestEnable){
 		m_pScissorTestEnable->Release();
-		m_pScissorTestEnable = NULL;
+		m_pScissorTestEnable = nullptr;
 	}
 }
 
@@ -208,7 +208,7 @@ Rml::Core::CompiledGeometryHandle RenderInterfaceDirectX10::CompileGeometry(Rml:
 	geometry->num_vertices = (DWORD) num_vertices;
 	geometry->num_primitives = (DWORD) num_indices / 3;
 
-	geometry->texture = texture == NULL ? NULL : (RmlUiD3D10Texture *) texture;
+	geometry->texture = texture == nullptr ? nullptr : (RmlUiD3D10Texture *) texture;
 
 	return (Rml::Core::CompiledGeometryHandle)geometry;
 }
@@ -224,7 +224,7 @@ void RenderInterfaceDirectX10::RenderCompiledGeometry(Rml::Core::CompiledGeometr
 	if (d3d10_geometry->texture)
 		m_pDiffuseTextureVariable->SetResource(d3d10_geometry->texture->textureView);
 	else
-		m_pDiffuseTextureVariable->SetResource(NULL);
+		m_pDiffuseTextureVariable->SetResource(nullptr);
 	
 	//build and send the world matrix
 	D3DXMatrixTranslation(&m_matWorld, translation.x, translation.y, 0);
@@ -269,11 +269,11 @@ void RenderInterfaceDirectX10::ReleaseCompiledGeometry(Rml::Core::CompiledGeomet
 
 	if (d3d10_geometry->vertices){
 		d3d10_geometry->vertices->Release();
-		d3d10_geometry->vertices = NULL;
+		d3d10_geometry->vertices = nullptr;
 	}
 	if (d3d10_geometry->indices){
 		d3d10_geometry->indices->Release();
-		d3d10_geometry->indices = NULL;
+		d3d10_geometry->indices = nullptr;
 	}
 
 	delete d3d10_geometry;
@@ -414,7 +414,7 @@ bool RenderInterfaceDirectX10::GenerateTexture(Rml::Core::TextureHandle& texture
 	textureDesc.SampleDesc.Quality=0;
 	
 	//create our texture
-	if (FAILED(m_pD3D10Device->CreateTexture2D(&textureDesc,NULL,&pTexture->texture2D))){
+	if (FAILED(m_pD3D10Device->CreateTexture2D(&textureDesc,nullptr,&pTexture->texture2D))){
 		Rml::Core::Log::Message(Rml::Core::Log::LT_ERROR, "Unable to create texture");
 		return false;
 	}
@@ -459,11 +459,11 @@ void RenderInterfaceDirectX10::ReleaseTexture(Rml::Core::TextureHandle texture_h
 	RmlUiD3D10Texture * pTexture = (RmlUiD3D10Texture*)texture_handle;
 	if (pTexture->texture2D){
 		pTexture->texture2D->Release();
-		pTexture->texture2D = NULL;
+		pTexture->texture2D = nullptr;
 	}
 	if (pTexture->textureView){
 		pTexture->textureView->Release();
-		pTexture->textureView = NULL;
+		pTexture->textureView = nullptr;
 	}
 	delete pTexture;
 }

+ 25 - 25
Samples/basic/directx10/src/ShellRenderInterfaceExtensionsDirectX10_Win32.cpp

@@ -41,7 +41,7 @@ void RenderInterfaceDirectX10::SetContext(void *context)
 
 void RenderInterfaceDirectX10::SetViewport(int width, int height)
 {
-	if(this->m_pD3D10Device != NULL)
+	if(this->m_pD3D10Device != nullptr)
 	{
 		if(width == 0 || height == 0)
 		{
@@ -53,7 +53,7 @@ void RenderInterfaceDirectX10::SetViewport(int width, int height)
 		{
 			// Release the existing render target
 			this->m_pRenderTargetView->Release();
-			this->m_pRenderTargetView = NULL;
+			this->m_pRenderTargetView = nullptr;
 		}
 
 		// Resize the swap chain's buffer to the given dimensions
@@ -63,18 +63,18 @@ void RenderInterfaceDirectX10::SetViewport(int width, int height)
 		ID3D10Texture2D *pBackBuffer;
 		if(FAILED(this->m_pSwapChain->GetBuffer(0, __uuidof(ID3D10Texture2D), (LPVOID*) &pBackBuffer)))
 		{
-			MessageBox(NULL, _T("SwapChain->GetBuffer failed."), _T("Could not resize DirectX 10 surface"), MB_OK|MB_ICONERROR);
+			MessageBox(nullptr, _T("SwapChain->GetBuffer failed."), _T("Could not resize DirectX 10 surface"), MB_OK|MB_ICONERROR);
 			return;
 		}
-		if(FAILED(this->m_pD3D10Device->CreateRenderTargetView(pBackBuffer, NULL, &this->m_pRenderTargetView)))
+		if(FAILED(this->m_pD3D10Device->CreateRenderTargetView(pBackBuffer, nullptr, &this->m_pRenderTargetView)))
 		{
 				pBackBuffer->Release();
-				MessageBox(NULL, _T("D3D10Device->CreateRenderTargetView failed."), _T("Could not resize DirectX 10 surface"), MB_OK|MB_ICONERROR);
+				MessageBox(nullptr, _T("D3D10Device->CreateRenderTargetView failed."), _T("Could not resize DirectX 10 surface"), MB_OK|MB_ICONERROR);
 				return;
 		}
 		pBackBuffer->Release();
 	
-		this->m_pD3D10Device->OMSetRenderTargets(1, &this->m_pRenderTargetView, NULL);
+		this->m_pD3D10Device->OMSetRenderTargets(1, &this->m_pRenderTargetView, nullptr);
 
 		D3D10_VIEWPORT vp;
 		vp.Width = width;
@@ -89,7 +89,7 @@ void RenderInterfaceDirectX10::SetViewport(int width, int height)
 		D3DXMatrixOrthoOffCenterLH(&this->m_matProjection, 0, width, height, 0, -1, 1);
 		m_pProjectionMatrixVariable->SetMatrix((float*)this->m_matProjection);
 
-		if(m_rmlui_context != NULL)
+		if(m_rmlui_context != nullptr)
 		{
 			((Rml::Core::Context*)m_rmlui_context)->SetDimensions(Rml::Core::Vector2i(width, height));
 			Rml::Core::Matrix4f mat;
@@ -136,13 +136,13 @@ bool RenderInterfaceDirectX10::AttachToNative(void *nativeWindow)
 	sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
 
 	//Create device and swapchain
-	if(FAILED(D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, createDeviceFlags,	D3D10_SDK_VERSION, &sd, &this->m_pSwapChain, &this->m_pD3D10Device)))
+	if(FAILED(D3D10CreateDeviceAndSwapChain(nullptr, D3D10_DRIVER_TYPE_HARDWARE, nullptr, createDeviceFlags,	D3D10_SDK_VERSION, &sd, &this->m_pSwapChain, &this->m_pD3D10Device)))
 	{
-		if(MessageBox(NULL, _T("D3D10CreateDeviceAndSwapChain failed for D3D10_DRIVER_TYPE_HARDWARE.\r\n\r\nWould you like to try the reference renderer, this will be very slow!"), _T("Could not intialized DirectX 10"), MB_OKCANCEL|MB_ICONERROR) == IDOK)
+		if(MessageBox(nullptr, _T("D3D10CreateDeviceAndSwapChain failed for D3D10_DRIVER_TYPE_HARDWARE.\r\n\r\nWould you like to try the reference renderer, this will be very slow!"), _T("Could not intialized DirectX 10"), MB_OKCANCEL|MB_ICONERROR) == IDOK)
 		{
-			if(FAILED(D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_REFERENCE, NULL, createDeviceFlags,	D3D10_SDK_VERSION, &sd, &this->m_pSwapChain, &this->m_pD3D10Device)))
+			if(FAILED(D3D10CreateDeviceAndSwapChain(nullptr, D3D10_DRIVER_TYPE_REFERENCE, nullptr, createDeviceFlags,	D3D10_SDK_VERSION, &sd, &this->m_pSwapChain, &this->m_pD3D10Device)))
 			{
-				MessageBox(NULL, _T("D3D10CreateDeviceAndSwapChain failed for D3D10_DRIVER_TYPE_REFERENCE, giving up."), _T("Could not intialized DirectX 10"), MB_OK|MB_ICONERROR);
+				MessageBox(nullptr, _T("D3D10CreateDeviceAndSwapChain failed for D3D10_DRIVER_TYPE_REFERENCE, giving up."), _T("Could not intialized DirectX 10"), MB_OK|MB_ICONERROR);
 				return false;
 			}
 		}
@@ -156,18 +156,18 @@ bool RenderInterfaceDirectX10::AttachToNative(void *nativeWindow)
 	ID3D10Texture2D *pBackBuffer;
 	if(FAILED (this->m_pSwapChain->GetBuffer(0, __uuidof(ID3D10Texture2D),(void**)&pBackBuffer)))
 	{
-		MessageBox(NULL, _T("SwapChain->GetBuffer failed."), _T("Could not intialized DirectX 10"), MB_OK|MB_ICONERROR);
+		MessageBox(nullptr, _T("SwapChain->GetBuffer failed."), _T("Could not intialized DirectX 10"), MB_OK|MB_ICONERROR);
 		return false;
 	}
-	if(FAILED(this->m_pD3D10Device->CreateRenderTargetView(pBackBuffer, NULL, &this->m_pRenderTargetView)))
+	if(FAILED(this->m_pD3D10Device->CreateRenderTargetView(pBackBuffer, nullptr, &this->m_pRenderTargetView)))
 	{
 			pBackBuffer->Release();
-			MessageBox(NULL, _T("D3D10Device->CreateRenderTargetView failed."), _T("Could not intialized DirectX 10"), MB_OK|MB_ICONERROR);
+			MessageBox(nullptr, _T("D3D10Device->CreateRenderTargetView failed."), _T("Could not intialized DirectX 10"), MB_OK|MB_ICONERROR);
 			return false;
 	}
 	pBackBuffer->Release();
 	
-	this->m_pD3D10Device->OMSetRenderTargets(1, &this->m_pRenderTargetView, NULL);
+	this->m_pD3D10Device->OMSetRenderTargets(1, &this->m_pRenderTargetView, nullptr);
 
 	D3D10_VIEWPORT vp;
 	vp.Width = width;
@@ -206,32 +206,32 @@ bool RenderInterfaceDirectX10::AttachToNative(void *nativeWindow)
 
 void RenderInterfaceDirectX10::DetachFromNative()
 {
-	if(this->m_pD3D10Device != NULL)
+	if(this->m_pD3D10Device != nullptr)
 	{
 		this->m_pD3D10Device->ClearState();
-		this->m_pD3D10Device = NULL;
+		this->m_pD3D10Device = nullptr;
 	}
-	if(this->m_pRenderTargetView != NULL)
+	if(this->m_pRenderTargetView != nullptr)
 	{
 		this->m_pRenderTargetView->Release();
-		this->m_pRenderTargetView = NULL;
+		this->m_pRenderTargetView = nullptr;
 	}
-	if(this->m_pSwapChain != NULL)
+	if(this->m_pSwapChain != nullptr)
 	{
 		this->m_pSwapChain->Release();
-		this->m_pSwapChain = NULL;
+		this->m_pSwapChain = nullptr;
 	}
-	if(this->m_pD3D10Device != NULL)
+	if(this->m_pD3D10Device != nullptr)
 	{
 		this->m_pD3D10Device->Release();
-		this->m_pD3D10Device = NULL;
+		this->m_pD3D10Device = nullptr;
 	}
 
 }
 
 void RenderInterfaceDirectX10::PrepareRenderBuffer()
 {
-	if(this->m_pD3D10Device == NULL)
+	if(this->m_pD3D10Device == nullptr)
 	{
 		return;
 	}
@@ -242,7 +242,7 @@ void RenderInterfaceDirectX10::PrepareRenderBuffer()
 
 void RenderInterfaceDirectX10::PresentRenderBuffer()
 {
-	if(this->m_pSwapChain == NULL)
+	if(this->m_pSwapChain == nullptr)
 	{
 		return;
 	}

+ 3 - 3
Samples/basic/directx10/src/main.cpp

@@ -10,7 +10,7 @@
 // For _T unicode/mbcs macro
 #include <tchar.h>
 
-static Rml::Core::Context* context = NULL;
+static Rml::Core::Context* context = nullptr;
 
 ShellRenderInterfaceExtensions *shell_renderer;
 
@@ -54,7 +54,7 @@ int APIENTRY WinMain(HINSTANCE RMLUI_UNUSED_PARAMETER(instance_handle), HINSTANC
 
 	// Create the main RmlUi context and set it on the shell's input layer.
 	context = Rml::Core::CreateContext("main", Rml::Core::Vector2i(window_width, window_height));
-	if (context == NULL)
+	if (context == nullptr)
 	{
 		Rml::Core::Shutdown();
 		Shell::Shutdown();
@@ -69,7 +69,7 @@ int APIENTRY WinMain(HINSTANCE RMLUI_UNUSED_PARAMETER(instance_handle), HINSTANC
 
 	// Load and show the tutorial document.
 	Rml::Core::ElementDocument* document = context->LoadDocument("assets/demo.rml");
-	if (document != NULL)
+	if (document != nullptr)
 	{
 		document->Show();
 		document->RemoveReference();

+ 2 - 2
Samples/basic/drag/src/DragListener.cpp

@@ -43,7 +43,7 @@ void DragListener::ProcessEvent(Rml::Core::Event& event)
 	{
 		Rml::Core::Element* dest_container = event.GetCurrentElement();
 		Rml::Core::Element* dest_element = event.GetTargetElement();
-		Rml::Core::Element* drag_element = static_cast< Rml::Core::Element* >(event.GetParameter< void* >("drag_element", NULL));
+		Rml::Core::Element* drag_element = static_cast< Rml::Core::Element* >(event.GetParameter< void* >("drag_element", nullptr));
 
 		if (dest_container == dest_element)
 		{
@@ -65,7 +65,7 @@ void DragListener::ProcessEvent(Rml::Core::Event& event)
 				// Check whether we're moving this icon from the left or the right.
 
 				Rml::Core::Element* previous_icon = insert_before->GetPreviousSibling();
-				while (previous_icon != NULL)
+				while (previous_icon != nullptr)
 				{
 					if (previous_icon == drag_element)
 					{

+ 4 - 4
Samples/basic/drag/src/Inventory.cpp

@@ -34,7 +34,7 @@
 Inventory::Inventory(const Rml::Core::String& title, const Rml::Core::Vector2f& position, Rml::Core::Context* context)
 {
 	document = context->LoadDocument("basic/drag/data/inventory.rml");
-	if (document != NULL)
+	if (document != nullptr)
 	{
 		using Rml::Core::PropertyId;
 		document->GetElementById("title")->SetInnerRML(title);
@@ -49,7 +49,7 @@ Inventory::Inventory(const Rml::Core::String& title, const Rml::Core::Vector2f&
 // Destroys the inventory and closes its window.
 Inventory::~Inventory()
 {
-	if (document != NULL)
+	if (document != nullptr)
 	{
 		document->Close();
 	}
@@ -58,11 +58,11 @@ Inventory::~Inventory()
 // Adds a brand-new item into this inventory.
 void Inventory::AddItem(const Rml::Core::String& name)
 {
-	if (document == NULL)
+	if (document == nullptr)
 		return;
 
 	Rml::Core::Element* content = document->GetElementById("content");
-	if (content == NULL)
+	if (content == nullptr)
 		return;
 
 	// Create the new 'icon' element.

+ 2 - 2
Samples/basic/drag/src/main.cpp

@@ -33,7 +33,7 @@
 #include <ShellRenderInterfaceOpenGL.h>
 #include "Inventory.h"
 
-Rml::Core::Context* context = NULL;
+Rml::Core::Context* context = nullptr;
 
 ShellRenderInterfaceExtensions *shell_renderer;
 
@@ -98,7 +98,7 @@ int main(int RMLUI_UNUSED_PARAMETER(argc), char** RMLUI_UNUSED_PARAMETER(argv))
 
 	// Create the main RmlUi context and set it on the shell's input layer.
 	context = Rml::Core::CreateContext("main", Rml::Core::Vector2i(window_width, window_height));
-	if (context == NULL)
+	if (context == nullptr)
 	{
 		Rml::Core::Shutdown();
 		Shell::Shutdown();

+ 2 - 2
Samples/basic/loaddocument/src/main.cpp

@@ -32,7 +32,7 @@
 #include <Shell.h>
 #include <ShellRenderInterfaceOpenGL.h>
 
-Rml::Core::Context* context = NULL;
+Rml::Core::Context* context = nullptr;
 
 ShellRenderInterfaceExtensions *shell_renderer;
 
@@ -91,7 +91,7 @@ int main(int RMLUI_UNUSED_PARAMETER(argc), char** RMLUI_UNUSED_PARAMETER(argv))
 
 	// Create the main RmlUi context and set it on the shell's input layer.
 	context = Rml::Core::CreateContext("main", Rml::Core::Vector2i(window_width, window_height));
-	if (context == NULL)
+	if (context == nullptr)
 	{
 		Rml::Core::Shutdown();
 		Shell::Shutdown();

+ 1 - 1
Samples/basic/sdl2/src/RenderInterfaceSDL2.cpp

@@ -54,7 +54,7 @@ void RmlUiSDL2Renderer::RenderGeometry(Rml::Core::Vertex* vertices, int num_vert
     std::vector<Rml::Core::Vector2f> TexCoords(num_vertices);
     float texw, texh;
  
-    SDL_Texture* sdl_texture = NULL;
+    SDL_Texture* sdl_texture = nullptr;
     if(texture)
     {
         glEnableClientState(GL_TEXTURE_COORD_ARRAY);

+ 1 - 1
Samples/basic/sdl2/src/main.cpp

@@ -108,7 +108,7 @@ int main(int argc, char **argv)
 	}
 	else
 	{
-		fprintf(stdout, "\nDocument is NULL");
+		fprintf(stdout, "\nDocument is nullptr");
 	}
 
     bool done = false;

+ 1 - 1
Samples/basic/sfml2/src/RenderInterfaceSFML.cpp

@@ -177,7 +177,7 @@ Rml::Core::CompiledGeometryHandle RmlUiSFMLRenderer::CompileGeometry(Rml::Core::
 
 	return (Rml::Core::CompiledGeometryHandle)Geometry;
 #else
-	return (Rml::Core::CompiledGeometryHandle)NULL;
+	return (Rml::Core::CompiledGeometryHandle)nullptr;
 #endif
 }
 

+ 1 - 1
Samples/basic/sfml2/src/main.cpp

@@ -108,7 +108,7 @@ int main(int argc, char **argv)
 	}
 	else
 	{
-		fprintf(stdout, "\nDocument is NULL");
+		fprintf(stdout, "\nDocument is nullptr");
 	}
 
 	while(MyWindow.isOpen())

+ 4 - 4
Samples/basic/transform/src/main.cpp

@@ -91,10 +91,10 @@ private:
 	Rml::Core::ElementDocument *document;
 };
 
-Rml::Core::Context* context = NULL;
+Rml::Core::Context* context = nullptr;
 ShellRenderInterfaceExtensions *shell_renderer;
-DemoWindow* window_1 = NULL;
-DemoWindow* window_2 = NULL;
+DemoWindow* window_1 = nullptr;
+DemoWindow* window_2 = nullptr;
 
 void GameLoop()
 {
@@ -156,7 +156,7 @@ int main(int RMLUI_UNUSED_PARAMETER(argc), char** RMLUI_UNUSED_PARAMETER(argv))
 
 	// Create the main RmlUi context and set it on the shell's input layer.
 	context = Rml::Core::CreateContext("main", Rml::Core::Vector2i(1024, 768));
-	if (context == NULL)
+	if (context == nullptr)
 	{
 		Rml::Core::Shutdown();
 		Shell::Shutdown();

+ 6 - 6
Samples/basic/treeview/src/FileSystem.cpp

@@ -40,7 +40,7 @@ struct FileSystemNode;
 
 typedef std::map< Rml::Core::String, FileSystemNode* > NodeMap;
 
-FileSystemNode* file_system_root = NULL;
+FileSystemNode* file_system_root = nullptr;
 NodeMap node_map;
 
 
@@ -88,7 +88,7 @@ struct FileSystemNode
 			_findclose(find_handle);
 		}
 #else
-			struct dirent** file_list = NULL;
+			struct dirent** file_list = nullptr;
 			int file_count = -1;
 			file_count = scandir((root + name).c_str(), &file_list, 0, alphasort);
 			if (file_count == -1)
@@ -136,7 +136,7 @@ FileSystem::FileSystem(const Rml::Core::String& root) : Rml::Controls::DataSourc
 FileSystem::~FileSystem()
 {
 	delete file_system_root;
-	file_system_root = NULL;
+	file_system_root = nullptr;
 }
 
 void FileSystem::GetRow(Rml::Core::StringList& row, const Rml::Core::String& table, int row_index, const Rml::Core::StringList& columns)
@@ -144,7 +144,7 @@ void FileSystem::GetRow(Rml::Core::StringList& row, const Rml::Core::String& tab
 	// Get the node that data is being queried from; one of its children (as indexed by row_index)
 	// is the actual node the data will be read from.
 	FileSystemNode* node = GetNode(table);
-	if (node == NULL)
+	if (node == nullptr)
 		return;
 
 	for (size_t i = 0; i < columns.size(); i++)
@@ -171,7 +171,7 @@ int FileSystem::GetNumRows(const Rml::Core::String& table)
 {
 	FileSystemNode* node = GetNode(table);
 
-	if (node != NULL)
+	if (node != nullptr)
 		return (int) node->child_nodes.size();
 
 	return 0;
@@ -189,5 +189,5 @@ FileSystemNode* FileSystem::GetNode(const Rml::Core::String& table)
 			return i->second;
 	}
 
-	return NULL;
+	return nullptr;
 }

+ 2 - 2
Samples/basic/treeview/src/main.cpp

@@ -35,7 +35,7 @@
 #include "FileFormatter.h"
 #include "FileSystem.h"
 
-Rml::Core::Context* context = NULL;
+Rml::Core::Context* context = nullptr;
 
 ShellRenderInterfaceExtensions *shell_renderer;
 
@@ -94,7 +94,7 @@ int main(int RMLUI_UNUSED_PARAMETER(argc), char** RMLUI_UNUSED_PARAMETER(argv))
 
 	// Create the main RmlUi context and set it on the shell's input layer.
 	context = Rml::Core::CreateContext("main", Rml::Core::Vector2i(window_width, window_height));
-	if (context == NULL)
+	if (context == nullptr)
 	{
 		Rml::Core::Shutdown();
 		Shell::Shutdown();

+ 1 - 1
Samples/invaders/src/DecoratorDefender.h

@@ -40,7 +40,7 @@ public:
 
 	/// Called on a decorator to generate any required per-element data for a newly decorated element.
 	/// @param element[in] The newly decorated element.
-	/// @return A handle to a decorator-defined data handle, or NULL if none is needed for the element.
+	/// @return A handle to a decorator-defined data handle, or nullptr if none is needed for the element.
 	Rml::Core::DecoratorDataHandle GenerateElementData(Rml::Core::Element* element) const override;
 	/// Called to release element data generated by this decorator.
 	/// @param element_data[in] The element data handle to release.

+ 1 - 1
Samples/invaders/src/DecoratorInstancerDefender.h

@@ -44,7 +44,7 @@ public:
 	/// Instances a decorator given the property tag and attributes from the RCSS file.
 	/// @param[in] name The type of decorator desired. For example, "background-decorator: simple;" is declared as type "simple".
 	/// @param[in] properties All RCSS properties associated with the decorator.
-	/// @return The decorator if it was instanced successful, NULL if an error occured.
+	/// @return The decorator if it was instanced successful, nullptr if an error occured.
 	std::shared_ptr<Rml::Core::Decorator> InstanceDecorator(const Rml::Core::String& name, const Rml::Core::PropertyDictionary& properties, const Rml::Core::DecoratorInstancerInterface& interface) override;
 
 private:

+ 1 - 1
Samples/invaders/src/DecoratorInstancerStarfield.h

@@ -45,7 +45,7 @@ public:
 	/// Instances a decorator given the property tag and attributes from the RCSS file.
 	/// @param name The type of decorator desired. For example, "background-decorator: simple;" is declared as type "simple".
 	/// @param properties All RCSS properties associated with the decorator.
-	/// @return The decorator if it was instanced successful, NULL if an error occured.
+	/// @return The decorator if it was instanced successful, nullptr if an error occured.
 	std::shared_ptr<Rml::Core::Decorator> InstanceDecorator(const Rml::Core::String& name, const Rml::Core::PropertyDictionary& properties, const Rml::Core::DecoratorInstancerInterface& interface) override;
 
 private:

+ 1 - 1
Samples/invaders/src/DecoratorStarfield.h

@@ -41,7 +41,7 @@ public:
 
 	/// Called on a decorator to generate any required per-element data for a newly decorated element.
 	/// @param[in] element The newly decorated element.
-	/// @return A handle to a decorator-defined data handle, or NULL if none is needed for the element.
+	/// @return A handle to a decorator-defined data handle, or nullptr if none is needed for the element.
 	Rml::Core::DecoratorDataHandle GenerateElementData(Rml::Core::Element* element) const override;
 	/// Called to release element data generated by this decorator.
 	/// @param[in] element_data The element data handle to release.

+ 8 - 8
Samples/invaders/src/EventHandlerOptions.cpp

@@ -51,7 +51,7 @@ void EventHandlerOptions::ProcessEvent(Rml::Core::Event& event, const Rml::Core:
 		// Fetch the document from the target of the 'onload' event. From here we can fetch the options elements by ID
 		// to manipulate them directly.
 		Rml::Core::ElementDocument* options_body = event.GetTargetElement()->GetOwnerDocument();
-		if (options_body == NULL)
+		if (options_body == nullptr)
 			return;
 
 		// Get the current graphics setting, and translate that into the ID of the radio button we need to set.
@@ -68,12 +68,12 @@ void EventHandlerOptions::ProcessEvent(Rml::Core::Event& event, const Rml::Core:
 		// This will automatically pop the other radio buttons in the set. Note that we could have not cast and called
 		// the 'Click()' function instead, but this method will avoid event overhead.
 		Rml::Controls::ElementFormControlInput* graphics_option = dynamic_cast< Rml::Controls::ElementFormControlInput* >(options_body->GetElementById(graphics_option_id));
-		if (graphics_option != NULL)
+		if (graphics_option != nullptr)
 			graphics_option->SetAttribute("checked", "");
 
 		// Fetch the reverb option by ID and set its checked status from the game options.
 		Rml::Controls::ElementFormControlInput* reverb_option = dynamic_cast< Rml::Controls::ElementFormControlInput* >(options_body->GetElementById("reverb"));
-		if (reverb_option != NULL)
+		if (reverb_option != nullptr)
 		{
 			if (GameDetails::GetReverb())
 				reverb_option->SetAttribute("checked", "");
@@ -83,7 +83,7 @@ void EventHandlerOptions::ProcessEvent(Rml::Core::Event& event, const Rml::Core:
 
 		// Similarly, fetch the 3D spatialisation option by ID and set its checked status.
 		Rml::Controls::ElementFormControlInput* spatialisation_option = dynamic_cast< Rml::Controls::ElementFormControlInput* >(options_body->GetElementById("3d"));
-		if (spatialisation_option != NULL)
+		if (spatialisation_option != nullptr)
 		{
 			if (GameDetails::Get3DSpatialisation())
 				spatialisation_option->SetAttribute("checked", "");
@@ -93,7 +93,7 @@ void EventHandlerOptions::ProcessEvent(Rml::Core::Event& event, const Rml::Core:
 
 		// Disable the accept button when default values are given
 		Rml::Controls::ElementFormControlInput* accept = dynamic_cast<Rml::Controls::ElementFormControlInput*>(options_body->GetElementById("accept"));
-		if (accept != NULL)
+		if (accept != nullptr)
 		{
 			accept->SetDisabled(true);
 		}
@@ -133,7 +133,7 @@ void EventHandlerOptions::ProcessEvent(Rml::Core::Event& event, const Rml::Core:
 	{
 		using namespace Rml::Core;
 		ElementDocument* options_body = event.GetTargetElement()->GetOwnerDocument();
-		if (options_body == NULL)
+		if (options_body == nullptr)
 			return;
 
 		Element* bad_warning = options_body->GetElementById("bad_warning");
@@ -150,12 +150,12 @@ void EventHandlerOptions::ProcessEvent(Rml::Core::Event& event, const Rml::Core:
 	else if (value == "enable_accept")
 	{
 		Rml::Core::ElementDocument* options_body = event.GetTargetElement()->GetOwnerDocument();
-		if (options_body == NULL)
+		if (options_body == nullptr)
 			return;
 
 		// Enable the accept button when values are changed
 		Rml::Controls::ElementFormControlInput* accept = dynamic_cast<Rml::Controls::ElementFormControlInput*>(options_body->GetElementById("accept"));
-		if (accept != NULL)
+		if (accept != nullptr)
 		{
 			accept->SetDisabled(false);
 		}

+ 9 - 9
Samples/invaders/src/EventManager.cpp

@@ -38,8 +38,8 @@
 // The game's element context (declared in main.cpp).
 extern Rml::Core::Context* context;
 
-// The event handler for the current screen. This may be NULL if the current screen has no specific functionality.
-static EventHandler* event_handler = NULL;
+// The event handler for the current screen. This may be nullptr if the current screen has no specific functionality.
+static EventHandler* event_handler = nullptr;
 
 // The event handlers registered with the manager.
 typedef std::map< Rml::Core::String, EventHandler* > EventHandlerMap;
@@ -60,7 +60,7 @@ void EventManager::Shutdown()
 		delete (*i).second;
 
 	event_handlers.clear();
-	event_handler = NULL;
+	event_handler = nullptr;
 }
 
 // Registers a new event handler with the manager.
@@ -103,14 +103,14 @@ void EventManager::ProcessEvent(Rml::Core::Event& event, const Rml::Core::String
 		}
 		else if (values[0] == "close")
 		{
-			Rml::Core::ElementDocument* target_document = NULL;
+			Rml::Core::ElementDocument* target_document = nullptr;
 
 			if (values.size() > 1)
 				target_document = context->GetDocument(values[1].c_str());
 			else
 				target_document = event.GetTargetElement()->GetOwnerDocument();
 
-			if (target_document != NULL)
+			if (target_document != nullptr)
 				target_document->Close();
 		}
 		else if (values[0] == "exit")
@@ -127,7 +127,7 @@ void EventManager::ProcessEvent(Rml::Core::Event& event, const Rml::Core::String
 		}
 		else
 		{
-			if (event_handler != NULL)
+			if (event_handler != nullptr)
 				event_handler->ProcessEvent(event, commands[i]);
 		}
 	}
@@ -142,12 +142,12 @@ Rml::Core::ElementDocument* EventManager::LoadWindow(const Rml::Core::String& wi
 	if (iterator != event_handlers.end())
 		event_handler = (*iterator).second;
 	else
-		event_handler = NULL;
+		event_handler = nullptr;
 
 	// Attempt to load the referenced RML document.
 	Rml::Core::String document_path = Rml::Core::String("invaders/data/") + window_name + Rml::Core::String(".rml");
 	Rml::Core::ElementDocument* document = context->LoadDocument(document_path.c_str());
-	if (document == NULL)
+	if (document == nullptr)
 	{
 		event_handler = old_event_handler;
 		return nullptr;
@@ -155,7 +155,7 @@ Rml::Core::ElementDocument* EventManager::LoadWindow(const Rml::Core::String& wi
 
 	// Set the element's title on the title; IDd 'title' in the RML.
 	Rml::Core::Element* title = document->GetElementById("title");
-	if (title != NULL)
+	if (title != nullptr)
 		title->SetInnerRML(document->GetTitle());
 
 	document->Focus();

+ 6 - 6
Samples/invaders/src/Game.cpp

@@ -74,11 +74,11 @@ Game::Game()
 	current_invader_direction = 1.0f;	
 	invaders = new Invader*[NUM_INVADERS + 1];
 	for (int i = 0; i < NUM_INVADERS + 1; i++)
-		invaders[i] = NULL;	
+		invaders[i] = nullptr;	
 
 	shields = new Shield*[NUM_SHIELDS];
 	for (int i = 0; i < NUM_SHIELDS; i++)
-		shields[i] = NULL;
+		shields[i] = nullptr;
 
 	// Use the OpenGL render interface to load our texture.
 	Rml::Core::Vector2i texture_dimensions;
@@ -228,7 +228,7 @@ void Game::SetScore(int score)
 	GameDetails::SetScore(score);
 
 	Rml::Core::Element* score_element = context->GetDocument("game_window")->GetElementById("score");
-	if (score_element != NULL)
+	if (score_element != nullptr)
 		score_element->SetInnerRML(Rml::Core::CreateString(128, "%d", score).c_str());
 
 	// Update the high score if we've beaten it.
@@ -240,7 +240,7 @@ void Game::SetScore(int score)
 void Game::SetHighScore(int score)
 {
 	Rml::Core::Element* high_score_element = context->GetDocument("game_window")->GetElementById("hiscore");
-	if (high_score_element != NULL)
+	if (high_score_element != nullptr)
 		high_score_element->SetInnerRML(Rml::Core::CreateString(128, "%d", score).c_str());
 }
 
@@ -249,7 +249,7 @@ void Game::SetLives(int lives)
 	defender_lives = lives;
 
 	Rml::Core::Element* score_element = context->GetDocument("game_window")->GetElementById("lives");
-	if (score_element != NULL)
+	if (score_element != nullptr)
 		score_element->SetInnerRML(Rml::Core::CreateString(128, "%d", defender_lives).c_str());
 }
 
@@ -258,7 +258,7 @@ void Game::SetWave(int wave)
 	GameDetails::SetWave(wave);
 
 	Rml::Core::Element* waves_element = context->GetDocument("game_window")->GetElementById("waves");
-	if (waves_element != NULL)
+	if (waves_element != nullptr)
 		waves_element->SetInnerRML(Rml::Core::CreateString(128, "%d", wave).c_str());
 }
 

+ 3 - 3
Samples/invaders/src/HighScores.cpp

@@ -30,11 +30,11 @@
 #include <RmlUi/Core/TypeConverter.h>
 #include <stdio.h>
 
-HighScores* HighScores::instance = NULL;
+HighScores* HighScores::instance = nullptr;
 
 HighScores::HighScores() : Rml::Controls::DataSource("high_scores")
 {
-	RMLUI_ASSERT(instance == NULL);
+	RMLUI_ASSERT(instance == nullptr);
 	instance = this;
 
 	for (int i = 0; i < NUM_SCORES; i++)
@@ -51,7 +51,7 @@ HighScores::~HighScores()
 
 	SaveScores();
 
-	instance = NULL;
+	instance = nullptr;
 }
 
 void HighScores::Initialise()

+ 2 - 2
Samples/invaders/src/main.cpp

@@ -44,7 +44,7 @@
 #include "HighScoresNameFormatter.h"
 #include "HighScoresShipFormatter.h"
 
-Rml::Core::Context* context = NULL;
+Rml::Core::Context* context = nullptr;
 
 ShellRenderInterfaceExtensions *shell_renderer;
 
@@ -105,7 +105,7 @@ int main(int RMLUI_UNUSED_PARAMETER(argc), char** RMLUI_UNUSED_PARAMETER(argv))
 
 	// Create the main RmlUi context and set it on the shell's input layer.
 	context = Rml::Core::CreateContext("main", Rml::Core::Vector2i(window_width, window_height));
-	if (context == NULL)
+	if (context == nullptr)
 	{
 		Rml::Core::Shutdown();
 		Shell::Shutdown();

+ 1 - 1
Samples/luainvaders/src/DecoratorDefender.h

@@ -40,7 +40,7 @@ public:
 
 	/// Called on a decorator to generate any required per-element data for a newly decorated element.
 	/// @param element[in] The newly decorated element.
-	/// @return A handle to a decorator-defined data handle, or NULL if none is needed for the element.
+	/// @return A handle to a decorator-defined data handle, or nullptr if none is needed for the element.
 	Rml::Core::DecoratorDataHandle GenerateElementData(Rml::Core::Element* element) const override;
 	/// Called to release element data generated by this decorator.
 	/// @param element_data[in] The element data handle to release.

+ 1 - 1
Samples/luainvaders/src/DecoratorInstancerDefender.h

@@ -44,7 +44,7 @@ public:
 	/// Instances a decorator given the property tag and attributes from the RCSS file.
 	/// @param[in] name The type of decorator desired. For example, "background-decorator: simple;" is declared as type "simple".
 	/// @param[in] properties All RCSS properties associated with the decorator.
-	/// @return The decorator if it was instanced successful, NULL if an error occured.
+	/// @return The decorator if it was instanced successful, nullptr if an error occured.
 	std::shared_ptr<Rml::Core::Decorator> InstanceDecorator(const Rml::Core::String& name, const Rml::Core::PropertyDictionary& properties, const Rml::Core::DecoratorInstancerInterface& interface) override;
 
 private:

+ 1 - 1
Samples/luainvaders/src/DecoratorInstancerStarfield.h

@@ -45,7 +45,7 @@ public:
 	/// Instances a decorator given the property tag and attributes from the RCSS file.
 	/// @param name The type of decorator desired. For example, "background-decorator: simple;" is declared as type "simple".
 	/// @param properties All RCSS properties associated with the decorator.
-	/// @return The decorator if it was instanced successful, NULL if an error occured.
+	/// @return The decorator if it was instanced successful, nullptr if an error occured.
 	std::shared_ptr<Rml::Core::Decorator> InstanceDecorator(const Rml::Core::String& name, const Rml::Core::PropertyDictionary& properties, const Rml::Core::DecoratorInstancerInterface& interface) override;
 
 private:

+ 1 - 1
Samples/luainvaders/src/DecoratorStarfield.h

@@ -41,7 +41,7 @@ public:
 
 	/// Called on a decorator to generate any required per-element data for a newly decorated element.
 	/// @param[in] element The newly decorated element.
-	/// @return A handle to a decorator-defined data handle, or NULL if none is needed for the element.
+	/// @return A handle to a decorator-defined data handle, or nullptr if none is needed for the element.
 	Rml::Core::DecoratorDataHandle GenerateElementData(Rml::Core::Element* element) const override;
 	/// Called to release element data generated by this decorator.
 	/// @param[in] element_data The element data handle to release.

+ 6 - 6
Samples/luainvaders/src/Game.cpp

@@ -73,11 +73,11 @@ Game::Game()
 	current_invader_direction = 1.0f;	
 	invaders = new Invader*[NUM_INVADERS + 1];
 	for (int i = 0; i < NUM_INVADERS + 1; i++)
-		invaders[i] = NULL;	
+		invaders[i] = nullptr;	
 
 	shields = new Shield*[NUM_SHIELDS];
 	for (int i = 0; i < NUM_SHIELDS; i++)
-		shields[i] = NULL;
+		shields[i] = nullptr;
 
 	// Use the OpenGL render interface to load our texture.
 	Rml::Core::Vector2i texture_dimensions;
@@ -225,7 +225,7 @@ void Game::SetScore(int score)
 	GameDetails::SetScore(score);
 
 	Rml::Core::Element* score_element = context->GetDocument("game_window")->GetElementById("score");
-	if (score_element != NULL)
+	if (score_element != nullptr)
 		score_element->SetInnerRML(Rml::Core::CreateString(128, "%d", score).c_str());
 
 	// Update the high score if we've beaten it.
@@ -237,7 +237,7 @@ void Game::SetScore(int score)
 void Game::SetHighScore(int score)
 {
 	Rml::Core::Element* high_score_element = context->GetDocument("game_window")->GetElementById("hiscore");
-	if (high_score_element != NULL)
+	if (high_score_element != nullptr)
 		high_score_element->SetInnerRML(Rml::Core::CreateString(128, "%d", score).c_str());
 }
 
@@ -246,7 +246,7 @@ void Game::SetLives(int lives)
 	defender_lives = lives;
 
 	Rml::Core::Element* score_element = context->GetDocument("game_window")->GetElementById("lives");
-	if (score_element != NULL)
+	if (score_element != nullptr)
 		score_element->SetInnerRML(Rml::Core::CreateString(128, "%d", defender_lives).c_str());
 }
 
@@ -255,7 +255,7 @@ void Game::SetWave(int wave)
 	GameDetails::SetWave(wave);
 
 	Rml::Core::Element* waves_element = context->GetDocument("game_window")->GetElementById("waves");
-	if (waves_element != NULL)
+	if (waves_element != nullptr)
 		waves_element->SetInnerRML(Rml::Core::CreateString(128, "%d", wave).c_str());
 }
 

+ 3 - 3
Samples/luainvaders/src/HighScores.cpp

@@ -30,11 +30,11 @@
 #include <RmlUi/Core/TypeConverter.h>
 #include <stdio.h>
 
-HighScores* HighScores::instance = NULL;
+HighScores* HighScores::instance = nullptr;
 
 HighScores::HighScores() : Rml::Controls::DataSource("high_scores")
 {
-	RMLUI_ASSERT(instance == NULL);
+	RMLUI_ASSERT(instance == nullptr);
 	instance = this;
 
 	for (int i = 0; i < NUM_SCORES; i++)
@@ -51,7 +51,7 @@ HighScores::~HighScores()
 
 	SaveScores();
 
-	instance = NULL;
+	instance = nullptr;
 }
 
 void HighScores::Initialise()

+ 5 - 5
Samples/luainvaders/src/main.cpp

@@ -42,7 +42,7 @@
 #include <RmlUi/Controls/Lua/Controls.h>
 #include "LuaInterface.h"
 
-Rml::Core::Context* context = NULL;
+Rml::Core::Context* context = nullptr;
 
 void DoAllocConsole();
 
@@ -100,7 +100,7 @@ int main(int, char**)
 
 	// Create the main RmlUi context and set it on the shell's input layer.
 	context = Rml::Core::CreateContext("main", Rml::Core::Vector2i(window_width, window_height));
-	if (context == NULL)
+	if (context == nullptr)
 	{
 		Rml::Core::Shutdown();
 		Shell::Shutdown();
@@ -174,7 +174,7 @@ void DoAllocConsole()
 	fp = _fdopen( hConHandle, "w" );
 
 	*stdout = *fp;
-	setvbuf( stdout, NULL, _IONBF, 0 );
+	setvbuf( stdout, nullptr, _IONBF, 0 );
 
 	// redirect unbuffered STDIN to the console
 	lStdHandle = (long)GetStdHandle(STD_INPUT_HANDLE);
@@ -182,7 +182,7 @@ void DoAllocConsole()
 	fp = _fdopen( hConHandle, "r" );
 
 	*stdin = *fp;
-	setvbuf( stdin, NULL, _IONBF, 0 );
+	setvbuf( stdin, nullptr, _IONBF, 0 );
 
 	// redirect unbuffered STDERR to the console
 	lStdHandle = (long)GetStdHandle(STD_ERROR_HANDLE);
@@ -190,7 +190,7 @@ void DoAllocConsole()
 	fp = _fdopen( hConHandle, "w" );
 	*stderr = *fp;
 
-	setvbuf( stderr, NULL, _IONBF, 0 );
+	setvbuf( stderr, nullptr, _IONBF, 0 );
 	ShowWindow(GetConsoleWindow(), SW_SHOW);
 }
 #endif

+ 1 - 1
Samples/shell/src/Input.cpp

@@ -303,7 +303,7 @@ char keypad_map[2][18] =
 
 
 
-Rml::Core::Context* Input::context = NULL;
+Rml::Core::Context* Input::context = nullptr;
 
 
 

+ 1 - 1
Samples/shell/src/ShellFileInterface.cpp

@@ -42,7 +42,7 @@ Rml::Core::FileHandle ShellFileInterface::Open(const Rml::Core::String& path)
 {
 	// Attempt to open the file relative to the application's root.
 	FILE* fp = fopen((root + path).c_str(), "rb");
-	if (fp != NULL)
+	if (fp != nullptr)
 		return (Rml::Core::FileHandle) fp;
 
 	// Attempt to open the file relative to the current working directory.

+ 2 - 2
Samples/shell/src/ShellRenderInterfaceOpenGL.cpp

@@ -33,7 +33,7 @@
 
 #define GL_CLAMP_TO_EDGE 0x812F
 
-ShellRenderInterfaceOpenGL::ShellRenderInterfaceOpenGL() : m_width(0), m_height(0), m_transforms(0), m_rmlui_context(NULL)
+ShellRenderInterfaceOpenGL::ShellRenderInterfaceOpenGL() : m_width(0), m_height(0), m_transforms(0), m_rmlui_context(nullptr)
 {
 
 }
@@ -77,7 +77,7 @@ Rml::Core::CompiledGeometryHandle ShellRenderInterfaceOpenGL::CompileGeometry(Rm
 	RMLUI_UNUSED(num_indices);
 	RMLUI_UNUSED(texture);
 
-	return (Rml::Core::CompiledGeometryHandle) NULL;
+	return (Rml::Core::CompiledGeometryHandle) nullptr;
 }
 
 // Called by RmlUi when it wants to render application-compiled geometry.		

+ 8 - 8
Samples/shell/src/macosx/InputMacOSX.cpp

@@ -67,7 +67,7 @@ OSStatus InputMacOSX::EventHandler(EventHandlerCallRef next_handler, EventRef ev
 				case kEventMouseDown:
 				{
 					EventMouseButton mouse_button;
-					if (GetEventParameter(event, kEventParamMouseButton, typeMouseButton, NULL, sizeof(EventMouseButton), NULL, &mouse_button) == noErr)
+					if (GetEventParameter(event, kEventParamMouseButton, typeMouseButton, nullptr, sizeof(EventMouseButton), nullptr, &mouse_button) == noErr)
 						context->ProcessMouseButtonDown(mouse_button - 1, GetKeyModifierState(event));
 				}
 				break;
@@ -75,7 +75,7 @@ OSStatus InputMacOSX::EventHandler(EventHandlerCallRef next_handler, EventRef ev
 				case kEventMouseUp:
 				{
 					EventMouseButton mouse_button;
-					if (GetEventParameter(event, kEventParamMouseButton, typeMouseButton, NULL, sizeof(EventMouseButton), NULL, &mouse_button) == noErr)
+					if (GetEventParameter(event, kEventParamMouseButton, typeMouseButton, nullptr, sizeof(EventMouseButton), nullptr, &mouse_button) == noErr)
 						context->ProcessMouseButtonUp(mouse_button - 1, GetKeyModifierState(event));
 				}
 				break;
@@ -85,8 +85,8 @@ OSStatus InputMacOSX::EventHandler(EventHandlerCallRef next_handler, EventRef ev
 					EventMouseWheelAxis axis;
 					SInt32 delta;
 
-					if (GetEventParameter(event, kEventParamMouseWheelAxis, typeMouseWheelAxis, NULL, sizeof(EventMouseWheelAxis), NULL, &axis) == noErr &&
-						GetEventParameter(event, kEventParamMouseWheelDelta, typeLongInteger, NULL, sizeof(SInt32), NULL, &delta) == noErr)
+					if (GetEventParameter(event, kEventParamMouseWheelAxis, typeMouseWheelAxis, nullptr, sizeof(EventMouseWheelAxis), nullptr, &axis) == noErr &&
+						GetEventParameter(event, kEventParamMouseWheelDelta, typeLongInteger, nullptr, sizeof(SInt32), nullptr, &delta) == noErr)
 					{
 						if (axis == kEventMouseWheelAxisY)
 							context->ProcessMouseWheel(-delta, GetKeyModifierState(event));
@@ -98,7 +98,7 @@ OSStatus InputMacOSX::EventHandler(EventHandlerCallRef next_handler, EventRef ev
 				case kEventMouseDragged:
 				{
 					HIPoint position;
-					if (GetEventParameter(event, kEventParamWindowMouseLocation, typeHIPoint, NULL, sizeof(HIPoint), NULL, &position) == noErr)
+					if (GetEventParameter(event, kEventParamWindowMouseLocation, typeHIPoint, nullptr, sizeof(HIPoint), nullptr, &position) == noErr)
 						context->ProcessMouseMove(position.x, position.y - 22, GetKeyModifierState(event));
 				}
 				break;
@@ -113,7 +113,7 @@ OSStatus InputMacOSX::EventHandler(EventHandlerCallRef next_handler, EventRef ev
 				case kEventRawKeyDown:
 				{
 					UInt32 key_code;
-					if (GetEventParameter(event, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &key_code) == noErr)
+					if (GetEventParameter(event, kEventParamKeyCode, typeUInt32, nullptr, sizeof(UInt32), nullptr, &key_code) == noErr)
 					{
 						Rml::Core::Input::KeyIdentifier key_identifier = key_identifier_map[key_code & 0xFF];
 						int key_modifier_state = GetKeyModifierState(event);
@@ -139,7 +139,7 @@ OSStatus InputMacOSX::EventHandler(EventHandlerCallRef next_handler, EventRef ev
 				case kEventRawKeyUp:
 				{
 					UInt32 key_code;
-					if (GetEventParameter(event, kEventParamKeyCode, typeUInt32, NULL, sizeof(UInt32), NULL, &key_code) == noErr)
+					if (GetEventParameter(event, kEventParamKeyCode, typeUInt32, nullptr, sizeof(UInt32), nullptr, &key_code) == noErr)
 					{
 						Rml::Core::Input::KeyIdentifier key_identifier = key_identifier_map[key_code & 0xFF];
 						int key_modifier_state = GetKeyModifierState(event);
@@ -162,7 +162,7 @@ static int GetKeyModifierState(EventRef event)
 	int key_modifier_state = 0;
 
 	UInt32 carbon_key_modifier_state;
-	if (GetEventParameter(event, kEventParamKeyModifiers, typeUInt32, NULL, sizeof(UInt32), NULL, &carbon_key_modifier_state) == noErr)
+	if (GetEventParameter(event, kEventParamKeyModifiers, typeUInt32, nullptr, sizeof(UInt32), nullptr, &carbon_key_modifier_state) == noErr)
 	{
 		if (carbon_key_modifier_state & KEY_ALT)
 			key_modifier_state |= Rml::Core::Input::KM_ALT;

+ 11 - 11
Samples/shell/src/macosx/ShellMacOSX.cpp

@@ -64,7 +64,7 @@ static OSStatus EventHandler(EventHandlerCallRef next_handler, EventRef event, v
 
 bool Shell::Initialise()
 {
-	gettimeofday(&start_time, NULL);
+	gettimeofday(&start_time, nullptr);
 
 	InputMacOSX::Initialise();
 
@@ -119,7 +119,7 @@ bool Shell::OpenWindow(const char* name, ShellRenderInterfaceExtensions *_shell_
 	if (result != noErr)
 		return false;
 
-	CFStringRef window_title = CFStringCreateWithCString(NULL, name, kCFStringEncodingUTF8);
+	CFStringRef window_title = CFStringCreateWithCString(nullptr, name, kCFStringEncodingUTF8);
 	if (result != noErr)
 		return false;
 
@@ -134,7 +134,7 @@ bool Shell::OpenWindow(const char* name, ShellRenderInterfaceExtensions *_shell_
 
 	ShowWindow(window);
     
-	if(shell_renderer != NULL) {
+	if(shell_renderer != nullptr) {
 		shell_renderer->AttachToNative(window);
 	}
     return true;
@@ -157,8 +157,8 @@ void Shell::EventLoop(ShellIdleFunction idle_function)
 	error = InstallApplicationEventHandler(NewEventHandlerUPP(InputMacOSX::EventHandler),
 										   GetEventTypeCount(INPUT_EVENTS),
 										   INPUT_EVENTS,
-										   NULL,
-										   NULL);
+										   nullptr,
+										   nullptr);
 	if (error != noErr)
 		DisplayError("Unable to install handler for input events, error: %d.", error);
 
@@ -166,8 +166,8 @@ void Shell::EventLoop(ShellIdleFunction idle_function)
 									  NewEventHandlerUPP(EventHandler),
 									  GetEventTypeCount(WINDOW_EVENTS),
 									  WINDOW_EVENTS,
-									  NULL,
-									  NULL);
+									  nullptr,
+									  nullptr);
 	if (error != noErr)
 		DisplayError("Unable to install handler for window events, error: %d.", error);
 
@@ -188,7 +188,7 @@ void Shell::EventLoop(ShellIdleFunction idle_function)
 void Shell::RequestExit()
 {
 	EventRef event;
-	OSStatus result = CreateEvent(NULL, // default allocator
+	OSStatus result = CreateEvent(nullptr, // default allocator
 								  kEventClassApplication, 
 								  kEventAppQuit, 
 								  0,						  
@@ -243,7 +243,7 @@ double Shell::GetElapsedTime()
 {
 	struct timeval now;
 
-	gettimeofday(&now, NULL);
+	gettimeofday(&now, nullptr);
 
 	double sec = now.tv_sec - start_time.tv_sec;
 	double usec = now.tv_usec;
@@ -290,12 +290,12 @@ static OSStatus EventHandler(EventHandlerCallRef next_handler, EventRef event, v
 				case kEventWindowBoundsChanged:
 					// Window resized, update the rmlui context
 					UInt32 attributes;
-					GetEventParameter(event, kEventParamAttributes, typeUInt32, NULL, sizeof(UInt32), NULL, &attributes);
+					GetEventParameter(event, kEventParamAttributes, typeUInt32, nullptr, sizeof(UInt32), nullptr, &attributes);
 
 					if(attributes & kWindowBoundsChangeSizeChanged)
 					{
 						Rect bounds;
-						GetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, NULL, sizeof(Rect), NULL, &bounds);
+						GetEventParameter(event, kEventParamCurrentBounds, typeQDRectangle, nullptr, sizeof(Rect), nullptr, &bounds);
 
 						UInt32 width = bounds.right - bounds.left;
 						UInt32 height = bounds.bottom - bounds.top;

+ 8 - 8
Samples/shell/src/macosx/ShellRenderInterfaceExtensionsOpenGL_MacOSX.cpp

@@ -56,7 +56,7 @@ void ShellRenderInterfaceOpenGL::SetViewport(int width, int height)
 
 		aglUpdateContext(gl_context);
 
-		if(m_rmlui_context != NULL)
+		if(m_rmlui_context != nullptr)
 		{
 			((Rml::Core::Context*)m_rmlui_context)->SetDimensions(Rml::Core::Vector2i(width, height));
 			((Rml::Core::Context*)m_rmlui_context)->ProcessProjectionChange(projection);
@@ -79,16 +79,16 @@ bool ShellRenderInterfaceOpenGL::AttachToNative(void *nativeWindow)
 		AGL_NONE
 	};
 	
-	AGLPixelFormat pixel_format = aglChoosePixelFormat(NULL, 0, attributes);
-	if (pixel_format == NULL)
+	AGLPixelFormat pixel_format = aglChoosePixelFormat(nullptr, 0, attributes);
+	if (pixel_format == nullptr)
 		return false;
 	
 	CGrafPtr window_port = GetWindowPort(window);
-	if (window_port == NULL)
+	if (window_port == nullptr)
 		return false;
 	
-	this->gl_context = aglCreateContext(pixel_format, NULL);
-	if (this->gl_context == NULL)
+	this->gl_context = aglCreateContext(pixel_format, nullptr);
+	if (this->gl_context == nullptr)
 		return false;
 	
 	aglSetDrawable(this->gl_context, window_port);
@@ -117,8 +117,8 @@ bool ShellRenderInterfaceOpenGL::AttachToNative(void *nativeWindow)
 void ShellRenderInterfaceOpenGL::DetachFromNative()
 {
 	// Shutdown OpenGL if necessary.
-	aglSetCurrentContext(NULL);
-	aglSetDrawable(this->gl_context, NULL);
+	aglSetCurrentContext(nullptr);
+	aglSetDrawable(this->gl_context, nullptr);
 	aglDestroyContext(this->gl_context);
 }
 

+ 1 - 1
Samples/shell/src/win32/InputWin32.cpp

@@ -50,7 +50,7 @@ void InputWin32::Shutdown()
 
 void InputWin32::ProcessWindowsEvent(UINT message, WPARAM w_param, LPARAM l_param)
 {
-	if (context == NULL)
+	if (context == nullptr)
 		return;
 
 	// Process all mouse and keyboard events

+ 9 - 9
Samples/shell/src/win32/ShellRenderInterfaceExtensionsOpenGL_Win32.cpp

@@ -54,7 +54,7 @@ void ShellRenderInterfaceOpenGL::SetViewport(int width, int height)
 		glMatrixMode(GL_MODELVIEW);
 		glLoadMatrixf(view.data());
 
-		if(m_rmlui_context != NULL)
+		if(m_rmlui_context != nullptr)
 		{
 			((Rml::Core::Context*)m_rmlui_context)->SetDimensions(Rml::Core::Vector2i(width, height));
 			((Rml::Core::Context*)m_rmlui_context)->ProcessProjectionChange(projection);
@@ -65,10 +65,10 @@ void ShellRenderInterfaceOpenGL::SetViewport(int width, int height)
 
 bool ShellRenderInterfaceOpenGL::AttachToNative(void *nativeWindow)
 {
-	this->render_context = NULL;
+	this->render_context = nullptr;
 	this->window_handle = (HWND)nativeWindow;
 	this->device_context = GetDC(this->window_handle);
-	if (this->device_context == NULL)
+	if (this->device_context == nullptr)
 	{
 		Shell::DisplayError("Could not get device context.");
 		return false;
@@ -102,7 +102,7 @@ bool ShellRenderInterfaceOpenGL::AttachToNative(void *nativeWindow)
 	}
 
 	this->render_context = wglCreateContext(this->device_context);
-	if (this->render_context == NULL)
+	if (this->render_context == nullptr)
 	{ 
 		Shell::DisplayError("Could not create OpenGL rendering context.");
 		return false;
@@ -138,17 +138,17 @@ bool ShellRenderInterfaceOpenGL::AttachToNative(void *nativeWindow)
 void ShellRenderInterfaceOpenGL::DetachFromNative()
 {
 	// Shutdown OpenGL
-	if (this->render_context != NULL)
+	if (this->render_context != nullptr)
 	{
-		wglMakeCurrent(NULL, NULL); 
+		wglMakeCurrent(nullptr, nullptr); 
 		wglDeleteContext(this->render_context);
-		this->render_context = NULL;
+		this->render_context = nullptr;
 	}
 
-	if (this->device_context != NULL)
+	if (this->device_context != nullptr)
 	{
 		ReleaseDC(this->window_handle, this->device_context);
-		this->device_context = NULL;
+		this->device_context = nullptr;
 	}
 }
 

+ 25 - 25
Samples/shell/src/win32/ShellWin32.cpp

@@ -38,24 +38,24 @@ static LRESULT CALLBACK WindowProcedure(HWND window_handle, UINT message, WPARAM
 
 static bool activated = true;
 static bool running = false;
-static const char* instance_name = NULL;
-static HWND window_handle = NULL;
-static HINSTANCE instance_handle = NULL;
+static const char* instance_name = nullptr;
+static HWND window_handle = nullptr;
+static HINSTANCE instance_handle = nullptr;
 
 static double time_frequency;
 static LARGE_INTEGER time_startup;
 
 static std::unique_ptr<ShellFileInterface> file_interface;
 
-static HCURSOR cursor_default = NULL;
-static HCURSOR cursor_move = NULL;
-static HCURSOR cursor_cross = NULL;
-static HCURSOR cursor_unavailable = NULL;
+static HCURSOR cursor_default = nullptr;
+static HCURSOR cursor_move = nullptr;
+static HCURSOR cursor_cross = nullptr;
+static HCURSOR cursor_unavailable = nullptr;
 
 
 bool Shell::Initialise()
 {
-	instance_handle = GetModuleHandle(NULL);
+	instance_handle = GetModuleHandle(nullptr);
 	InputWin32::Initialise();
 
 	LARGE_INTEGER time_ticks_per_second;
@@ -65,10 +65,10 @@ bool Shell::Initialise()
 	time_frequency = 1.0 / (double) time_ticks_per_second.QuadPart;
 
 	// Load cursors
-	cursor_default = LoadCursorA(NULL, IDC_ARROW);
-	cursor_move = LoadCursorA(NULL, IDC_SIZEALL);
-	cursor_cross = LoadCursorA(NULL, IDC_CROSS);
-	cursor_unavailable = LoadCursorA(NULL, IDC_NO);
+	cursor_default = LoadCursorA(nullptr, IDC_ARROW);
+	cursor_move = LoadCursorA(nullptr, IDC_SIZEALL);
+	cursor_cross = LoadCursorA(nullptr, IDC_CROSS);
+	cursor_unavailable = LoadCursorA(nullptr, IDC_NO);
 
 	Rml::Core::String root = FindSamplesRoot();
 	
@@ -103,7 +103,7 @@ Rml::Core::String Shell::FindSamplesRoot()
 	return executable_path + path;
 }
 
-static ShellRenderInterfaceExtensions *shell_renderer = NULL;
+static ShellRenderInterfaceExtensions *shell_renderer = nullptr;
 bool Shell::OpenWindow(const char* name, ShellRenderInterfaceExtensions *_shell_renderer, unsigned int width, unsigned int height, bool allow_resize)
 {
 	WNDCLASS window_class;
@@ -114,10 +114,10 @@ bool Shell::OpenWindow(const char* name, ShellRenderInterfaceExtensions *_shell_
 	window_class.cbClsExtra = 0;
 	window_class.cbWndExtra = 0;
 	window_class.hInstance = instance_handle;
-	window_class.hIcon = LoadIcon(NULL, IDI_WINLOGO);
+	window_class.hIcon = LoadIcon(nullptr, IDI_WINLOGO);
 	window_class.hCursor = cursor_default;
-	window_class.hbrBackground = NULL;
-	window_class.lpszMenuName = NULL;
+	window_class.hbrBackground = nullptr;
+	window_class.lpszMenuName = nullptr;
 	window_class.lpszClassName = name;
 
 	if (!RegisterClass(&window_class))
@@ -134,10 +134,10 @@ bool Shell::OpenWindow(const char* name, ShellRenderInterfaceExtensions *_shell_
 								   WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_OVERLAPPEDWINDOW,
 								   0, 0,	// Window position.
 								   width, height,// Window size.
-								   NULL,
-								   NULL,
+								   nullptr,
+								   nullptr,
 								   instance_handle,
-								   NULL);
+								   nullptr);
 	if (!window_handle)
 	{
 		DisplayError("Could not create window.");
@@ -162,7 +162,7 @@ bool Shell::OpenWindow(const char* name, ShellRenderInterfaceExtensions *_shell_
 	SetWindowLong(window_handle, GWL_EXSTYLE, extended_style);
 	SetWindowLong(window_handle, GWL_STYLE, style);
 
-	if (_shell_renderer != NULL)
+	if (_shell_renderer != nullptr)
 	{
 		shell_renderer = _shell_renderer;
 		if(!shell_renderer->AttachToNative(window_handle))
@@ -207,9 +207,9 @@ void Shell::EventLoop(ShellIdleFunction idle_function)
 	// Loop on PeekMessage() / GetMessage() until exit has been requested.
 	while (running)
 	{
-		if (PeekMessage(&message, NULL, 0, 0, PM_NOREMOVE))
+		if (PeekMessage(&message, nullptr, 0, 0, PM_NOREMOVE))
 		{
-			GetMessage(&message, NULL, 0, 0);
+			GetMessage(&message, nullptr, 0, 0);
 
 			TranslateMessage(&message);
 			DispatchMessage(&message);
@@ -279,7 +279,7 @@ void Shell::SetMouseCursor(const Rml::Core::String& cursor_name)
 {
 	if (window_handle)
 	{
-		HCURSOR cursor_handle = NULL;
+		HCURSOR cursor_handle = nullptr;
 		if (cursor_name.empty())
 			cursor_handle = cursor_default;
 		else if(cursor_name == "move")
@@ -311,7 +311,7 @@ void Shell::SetClipboardText(const Rml::Core::WString& text)
 		HGLOBAL clipboard_data = GlobalAlloc(GMEM_FIXED, size);
 		memcpy(clipboard_data, text.data(), size);
 
-		if (SetClipboardData(CF_UNICODETEXT, clipboard_data) == NULL)
+		if (SetClipboardData(CF_UNICODETEXT, clipboard_data) == nullptr)
 		{
 			CloseClipboard();
 			GlobalFree(clipboard_data);
@@ -329,7 +329,7 @@ void Shell::GetClipboardText(Rml::Core::WString& text)
 			return;
 
 		HANDLE clipboard_data = GetClipboardData(CF_UNICODETEXT);
-		if (clipboard_data == NULL)
+		if (clipboard_data == nullptr)
 		{
 			CloseClipboard();
 			return;

+ 3 - 3
Samples/shell/src/x11/InputX11.cpp

@@ -49,7 +49,7 @@ static bool has_xkblib = false;
 #endif // HAS_X11XKBLIB
 
 static int min_keycode, max_keycode, keysyms_per_keycode;
-static KeySym *x11_key_mapping = NULL;
+static KeySym *x11_key_mapping = nullptr;
 
 bool InputX11::Initialise()
 {
@@ -63,7 +63,7 @@ void InputX11::Shutdown()
 
 void InputX11::InitialiseX11Keymap(Display *display)
 {
-	RMLUI_ASSERT(display != NULL);
+	RMLUI_ASSERT(display != nullptr);
 
 #ifdef HAS_X11XKBLIB
 	int opcode_rtrn = -1;
@@ -85,7 +85,7 @@ void InputX11::InitialiseX11Keymap(Display *display)
 	{
 		XDisplayKeycodes(display, &min_keycode, &max_keycode);
 
-		RMLUI_ASSERT(x11_key_mapping != NULL);
+		RMLUI_ASSERT(x11_key_mapping != nullptr);
 		x11_key_mapping = XGetKeyboardMapping(display, min_keycode, max_keycode + 1 - min_keycode, &keysyms_per_keycode);
 	}
 }

+ 5 - 5
Samples/shell/src/x11/ShellRenderInterfaceExtensionsOpenGL_X11.cpp

@@ -56,7 +56,7 @@ void ShellRenderInterfaceOpenGL::SetViewport(int width, int height)
 		glMatrixMode(GL_MODELVIEW);
 		glLoadMatrixf(view.data());
 
-		if(m_rmlui_context != NULL)
+		if(m_rmlui_context != nullptr)
 		{
 			((Rml::Core::Context*)m_rmlui_context)->SetDimensions(Rml::Core::Vector2i(width, height));
 			((Rml::Core::Context*)m_rmlui_context)->ProcessProjectionChange(projection);
@@ -71,8 +71,8 @@ bool ShellRenderInterfaceOpenGL::AttachToNative(void *nativeWindow)
 	this->nwData.window = ((__X11NativeWindowData *)nativeWindow)->window;
 	this->nwData.visual_info = ((__X11NativeWindowData *)nativeWindow)->visual_info;
 
-	this->gl_context = glXCreateContext(nwData.display, nwData.visual_info, NULL, GL_TRUE);
-	if (this->gl_context == NULL)
+	this->gl_context = glXCreateContext(nwData.display, nwData.visual_info, nullptr, GL_TRUE);
+	if (this->gl_context == nullptr)
 		return false;
 	
 	if (!glXMakeCurrent(nwData.display, nwData.window, this->gl_context))
@@ -107,9 +107,9 @@ bool ShellRenderInterfaceOpenGL::AttachToNative(void *nativeWindow)
 void ShellRenderInterfaceOpenGL::DetachFromNative()
 {
 	// Shutdown OpenGL	
-	glXMakeCurrent(this->nwData.display, 0L, NULL);
+	glXMakeCurrent(this->nwData.display, 0L, nullptr);
 	glXDestroyContext(this->nwData.display, this->gl_context);
-	this->gl_context = NULL;
+	this->gl_context = nullptr;
 }
 
 void ShellRenderInterfaceOpenGL::PrepareRenderBuffer()

+ 16 - 16
Samples/shell/src/x11/ShellX11.cpp

@@ -58,7 +58,7 @@ static bool isDirectory(const Rml::Core::String &path)
 
 bool Shell::Initialise()
 {
-	gettimeofday(&start_time, NULL);
+	gettimeofday(&start_time, nullptr);
 	InputX11::Initialise();
 
 	Rml::Core::String root = FindSamplesRoot();
@@ -104,16 +104,16 @@ Rml::Core::String Shell::FindSamplesRoot()
 	return (executable_path + path);
 }
 
-static Display* display = NULL;
-static XVisualInfo* visual_info = NULL;
+static Display* display = nullptr;
+static XVisualInfo* visual_info = nullptr;
 static Window window = 0;
 
-static ShellRenderInterfaceExtensions *shell_renderer = NULL;
+static ShellRenderInterfaceExtensions *shell_renderer = nullptr;
 
 bool Shell::OpenWindow(const char* name, ShellRenderInterfaceExtensions *_shell_renderer, unsigned int width, unsigned int height, bool allow_resize)
 {
 	display = XOpenDisplay(0);
-	if (display == NULL)
+	if (display == nullptr)
 		return false;
 
 	// This initialise they keyboard to keycode mapping system of X11
@@ -134,7 +134,7 @@ bool Shell::OpenWindow(const char* name, ShellRenderInterfaceExtensions *_shell_
 							0L};
 
 	visual_info = glXChooseVisual(display, screen, attribute_list);
-	if (visual_info == NULL)
+	if (visual_info == nullptr)
 	{
 		return false;
   	}
@@ -174,7 +174,7 @@ bool Shell::OpenWindow(const char* name, ShellRenderInterfaceExtensions *_shell_
 	{
 		// Force the window to remain at the fixed size by asking the window manager nicely, it may choose to ignore us
 		XSizeHints* win_size_hints = XAllocSizeHints();		// Allocate a size hint structure
-		if (win_size_hints == NULL)
+		if (win_size_hints == nullptr)
 		{
 			fprintf(stderr, "XAllocSizeHints - out of memory\n");
 		}
@@ -200,11 +200,11 @@ bool Shell::OpenWindow(const char* name, ShellRenderInterfaceExtensions *_shell_
 	}
 
 	// Set the window title and show the window.
-	XSetStandardProperties(display, window, name, "", 0L, NULL, 0, NULL);
+	XSetStandardProperties(display, window, name, "", 0L, nullptr, 0, nullptr);
 	XMapRaised(display, window);
 
 	shell_renderer = _shell_renderer;
-	if(shell_renderer != NULL)
+	if(shell_renderer != nullptr)
 	{
 		struct __X11NativeWindowData nwData;
 		nwData.display = display;
@@ -217,22 +217,22 @@ bool Shell::OpenWindow(const char* name, ShellRenderInterfaceExtensions *_shell_
 
 void Shell::CloseWindow()
 {
-	if(shell_renderer != NULL)
+	if(shell_renderer != nullptr)
 	{
 		shell_renderer->DetachFromNative();
 	}
 
-	if (display != NULL)
+	if (display != nullptr)
 	{
 		XCloseDisplay(display);
-		display = NULL;
+		display = nullptr;
 	}
 }
 
 // Returns a platform-dependent handle to the window.
 void* Shell::GetWindowHandle()
 {
-	return NULL;
+	return nullptr;
 }
 
 void Shell::EventLoop(ShellIdleFunction idle_function)
@@ -245,7 +245,7 @@ void Shell::EventLoop(ShellIdleFunction idle_function)
 		while (XPending(display) > 0)
 		{
 			XEvent event;
-			char *event_type = NULL;
+			char *event_type = nullptr;
 			XNextEvent(display, &event);
 
 			switch (event.type)
@@ -258,7 +258,7 @@ void Shell::EventLoop(ShellIdleFunction idle_function)
 					if (strcmp(event_type, "WM_PROTOCOLS") == 0)
 						running = false;
 					XFree(event_type);
-					event_type = NULL;
+					event_type = nullptr;
 				}
 				break;
 
@@ -332,7 +332,7 @@ double Shell::GetElapsedTime()
 {
 	struct timeval now;
 
-	gettimeofday(&now, NULL);
+	gettimeofday(&now, nullptr);
 
 	double sec = now.tv_sec - start_time.tv_sec;
 	double usec = now.tv_usec - start_time.tv_usec;

+ 1 - 1
Samples/tutorial/datagrid/src/DecoratorDefender.h

@@ -28,7 +28,7 @@ public:
 
 	/// Called on a decorator to generate any required per-element data for a newly decorated element.
 	/// @param element[in] The newly decorated element.
-	/// @return A handle to a decorator-defined data handle, or NULL if none is needed for the element.
+	/// @return A handle to a decorator-defined data handle, or nullptr if none is needed for the element.
 	Rml::Core::DecoratorDataHandle GenerateElementData(Rml::Core::Element* element) const override;
 	/// Called to release element data generated by this decorator.
 	/// @param element_data[in] The element data handle to release.

+ 3 - 3
Samples/tutorial/datagrid/src/HighScores.cpp

@@ -15,11 +15,11 @@
 #include <RmlUi/Core.h>
 #include <stdio.h>
 
-HighScores* HighScores::instance = NULL;
+HighScores* HighScores::instance = nullptr;
 
 HighScores::HighScores()
 {
-	RMLUI_ASSERT(instance == NULL);
+	RMLUI_ASSERT(instance == nullptr);
 	instance = this;
 
 	for (int i = 0; i < NUM_SCORES; i++)
@@ -33,7 +33,7 @@ HighScores::HighScores()
 HighScores::~HighScores()
 {
 	RMLUI_ASSERT(instance == this);
-	instance = NULL;
+	instance = nullptr;
 }
 
 void HighScores::Initialise()

+ 2 - 2
Samples/tutorial/datagrid/src/main.cpp

@@ -18,7 +18,7 @@
 #include "DecoratorInstancerDefender.h"
 #include "HighScores.h"
 
-Rml::Core::Context* context = NULL;
+Rml::Core::Context* context = nullptr;
 
 ShellRenderInterfaceExtensions *shell_renderer;
 
@@ -75,7 +75,7 @@ int main(int RMLUI_UNUSED_PARAMETER(argc), char** RMLUI_UNUSED_PARAMETER(argv))
 
 	// Create the main RmlUi context and set it on the shell's input layer.
 	context = Rml::Core::CreateContext("main", Rml::Core::Vector2i(1024, 768));
-	if (context == NULL)
+	if (context == nullptr)
 	{
 		Rml::Core::Shutdown();
 		Shell::Shutdown();

+ 1 - 1
Samples/tutorial/datagrid_tree/src/DecoratorDefender.h

@@ -28,7 +28,7 @@ public:
 
 	/// Called on a decorator to generate any required per-element data for a newly decorated element.
 	/// @param element[in] The newly decorated element.
-	/// @return A handle to a decorator-defined data handle, or NULL if none is needed for the element.
+	/// @return A handle to a decorator-defined data handle, or nullptr if none is needed for the element.
 	Rml::Core::DecoratorDataHandle GenerateElementData(Rml::Core::Element* element) const override;
 	/// Called to release element data generated by this decorator.
 	/// @param element_data[in] The element data handle to release.

+ 3 - 3
Samples/tutorial/datagrid_tree/src/HighScores.cpp

@@ -15,11 +15,11 @@
 #include <RmlUi/Core.h>
 #include <stdio.h>
 
-HighScores* HighScores::instance = NULL;
+HighScores* HighScores::instance = nullptr;
 
 HighScores::HighScores() : Rml::Controls::DataSource("high_scores")
 {
-	RMLUI_ASSERT(instance == NULL);
+	RMLUI_ASSERT(instance == nullptr);
 	instance = this;
 
 	for (int i = 0; i < NUM_SCORES; i++)
@@ -33,7 +33,7 @@ HighScores::HighScores() : Rml::Controls::DataSource("high_scores")
 HighScores::~HighScores()
 {
 	RMLUI_ASSERT(instance == this);
-	instance = NULL;
+	instance = nullptr;
 }
 
 void HighScores::Initialise()

+ 2 - 2
Samples/tutorial/datagrid_tree/src/main.cpp

@@ -19,7 +19,7 @@
 #include "HighScores.h"
 #include "HighScoresShipFormatter.h"
 
-Rml::Core::Context* context = NULL;
+Rml::Core::Context* context = nullptr;
 
 ShellRenderInterfaceExtensions *shell_renderer;
 
@@ -79,7 +79,7 @@ int main(int RMLUI_UNUSED_PARAMETER(argc), char** RMLUI_UNUSED_PARAMETER(argv))
 
 	// Create the main RmlUi context and set it on the shell's input layer.
 	context = Rml::Core::CreateContext("main", Rml::Core::Vector2i(window_width, window_height));
-	if (context == NULL)
+	if (context == nullptr)
 	{
 		Rml::Core::Shutdown();
 		Shell::Shutdown();

+ 2 - 2
Samples/tutorial/drag/src/main.cpp

@@ -16,7 +16,7 @@
 #include <ShellRenderInterfaceOpenGL.h>
 #include "Inventory.h"
 
-Rml::Core::Context* context = NULL;
+Rml::Core::Context* context = nullptr;
 
 ShellRenderInterfaceExtensions *shell_renderer;
 
@@ -75,7 +75,7 @@ int main(int RMLUI_UNUSED_PARAMETER(argc), char** RMLUI_UNUSED_PARAMETER(argv))
 
 	// Create the main RmlUi context and set it on the shell's input layer.
 	context = Rml::Core::CreateContext("main", Rml::Core::Vector2i(window_width, window_height));
-	if (context == NULL)
+	if (context == nullptr)
 	{
 		Rml::Core::Shutdown();
 		Shell::Shutdown();

+ 2 - 2
Samples/tutorial/template/src/main.cpp

@@ -15,7 +15,7 @@
 #include <Shell.h>
 #include <ShellRenderInterfaceOpenGL.h>
 
-Rml::Core::Context* context = NULL;
+Rml::Core::Context* context = nullptr;
 
 ShellRenderInterfaceExtensions *shell_renderer;
 
@@ -74,7 +74,7 @@ int main(int RMLUI_UNUSED_PARAMETER(argc), char** RMLUI_UNUSED_PARAMETER(argv))
 
 	// Create the main RmlUi context and set it on the shell's input layer.
 	context = Rml::Core::CreateContext("main", Rml::Core::Vector2i(window_width, window_height));
-	if (context == NULL)
+	if (context == nullptr)
 	{
 		Rml::Core::Shutdown();
 		Shell::Shutdown();

+ 2 - 2
Source/Controls/DataFormatter.cpp

@@ -61,7 +61,7 @@ DataFormatter* DataFormatter::GetDataFormatter(const Rml::Core::String& data_for
 	DataFormatterMap::iterator i = data_formatters.find(data_formatter_name);
 	if (i == data_formatters.end())
 	{
-		return NULL;
+		return nullptr;
 	}
 
 	return (*i).second;
@@ -69,7 +69,7 @@ DataFormatter* DataFormatter::GetDataFormatter(const Rml::Core::String& data_for
 
 void* DataFormatter::GetScriptObject() const
 {
-	return NULL;
+	return nullptr;
 }
 
 }

+ 1 - 1
Source/Controls/DataQuery.cpp

@@ -64,7 +64,7 @@ DataQuery::DataQuery(DataSource* data_source, const Rml::Core::String& table, co
 
 DataQuery::DataQuery()
 {
-	data_source = NULL;
+	data_source = nullptr;
 	table = "";
 	offset = -1;
 	limit = -1;

+ 2 - 2
Source/Controls/DataSource.cpp

@@ -81,7 +81,7 @@ DataSource* DataSource::GetDataSource(const Rml::Core::String& data_source_name)
 	DataSourceMap::iterator i = data_sources.find(data_source_name);
 	if (i == data_sources.end())
 	{
-		return NULL;
+		return nullptr;
 	}
 
 	return (*i).second;
@@ -109,7 +109,7 @@ void DataSource::DetachListener(DataSourceListener* listener)
 
 void* DataSource::GetScriptObject() const
 {
-	return NULL;
+	return nullptr;
 }
 
 void DataSource::NotifyRowAdd(const Rml::Core::String& table, int first_row_added, int num_rows_added)

+ 2 - 2
Source/Controls/DataSourceListener.cpp

@@ -87,7 +87,7 @@ bool DataSourceListener::ParseDataSource(DataSource*& data_source, Rml::Core::St
 {
 	if (data_source_name.size() == 0)
 	{
-		data_source = NULL;
+		data_source = nullptr;
 		table_name = "";
 		return false;
 	}
@@ -100,7 +100,7 @@ bool DataSourceListener::ParseDataSource(DataSource*& data_source, Rml::Core::St
 	if (data_source_parts.size() != 2 || !new_data_source)
 	{
 		Rml::Core::Log::Message(Rml::Core::Log::LT_ERROR, "Bad data source name %s", data_source_name.c_str());
-		data_source = NULL;
+		data_source = nullptr;
 		table_name = "";
 		return false;
 	}

+ 2 - 2
Source/Controls/ElementDataGrid.cpp

@@ -159,7 +159,7 @@ const ElementDataGrid::Column* ElementDataGrid::GetColumn(int column_index)
 	if (column_index < 0 || column_index >= (int)columns.size())
 	{
 		RMLUI_ERROR;
-		return NULL;
+		return nullptr;
 	}
 
 	return &columns[column_index];
@@ -184,7 +184,7 @@ ElementDataGridRow* ElementDataGrid::AddRow(ElementDataGridRow* parent, int inde
 	// We need to work out the table-specific row.
 	int table_relative_index = parent->GetChildTableRelativeIndex(index);
 
-	Core::Element* child_to_insert_before = NULL;
+	Core::Element* child_to_insert_before = nullptr;
 	if (table_relative_index < body->GetNumChildren())
 	{
 		child_to_insert_before = body->GetChild(table_relative_index);

+ 10 - 10
Source/Controls/ElementDataGridRow.cpp

@@ -41,12 +41,12 @@ static const float MAX_UPDATE_TIME = 0.001f;
 
 ElementDataGridRow::ElementDataGridRow(const Rml::Core::String& tag) : Core::Element(tag)
 {
-	parent_grid = NULL;
-	parent_row = NULL;
+	parent_grid = nullptr;
+	parent_row = nullptr;
 	child_index = -1;
 	depth = -1;
 
-	data_source = NULL;
+	data_source = nullptr;
 
 	table_relative_index = -1;
 	table_relative_index_dirty = true;
@@ -63,7 +63,7 @@ ElementDataGridRow::~ElementDataGridRow()
 	if (data_source)
 	{
 		data_source->DetachListener(this);
-		data_source = NULL;
+		data_source = nullptr;
 	}
 }
 
@@ -112,10 +112,10 @@ int ElementDataGridRow::GetDepth()
 
 void ElementDataGridRow::SetDataSource(const Rml::Core::String& data_source_name)
 {
-	if (data_source != NULL)
+	if (data_source != nullptr)
 	{
 		data_source->DetachListener(this);
-		data_source = NULL;
+		data_source = nullptr;
 	}
 
 	if (ParseDataSource(data_source, data_table, data_source_name))
@@ -253,10 +253,10 @@ ElementDataGrid* ElementDataGridRow::GetParentGrid()
 
 void ElementDataGridRow::OnDataSourceDestroy(DataSource* RMLUI_UNUSED_PARAMETER(_data_source))
 {
-	if(data_source != NULL)
+	if(data_source != nullptr)
 	{
 		data_source->DetachListener(this);
-		data_source = NULL;
+		data_source = nullptr;
 	}
 	RemoveChildren();
 }
@@ -292,7 +292,7 @@ void ElementDataGridRow::RefreshRows()
 	RemoveChildren();
 
 	// Load the children from the data source.
-	if (data_source != NULL)
+	if (data_source != nullptr)
 	{
 		int num_rows = data_source->GetNumRows(data_table);
 		if (num_rows > 0)
@@ -375,7 +375,7 @@ void ElementDataGridRow::AddChildren(int first_row_added, int num_rows_added)
 
 	// We need to make a row for each new child, then pass through the cell
 	// information and the child's data source (if one exists.)
-	if (data_source != NULL)
+	if (data_source != nullptr)
 	{
 		for (int i = 0; i < num_rows_added; i++)
 		{

+ 1 - 1
Source/Controls/ElementForm.cpp

@@ -81,7 +81,7 @@ void ElementForm::Submit(const Rml::Core::String& name, const Rml::Core::String&
 
 		// If the item already exists, append to it.
 		Rml::Core::Variant* value = GetIf(values, control_name);
-		if (value != NULL)
+		if (value != nullptr)
 			*value = value->Get< Rml::Core::String >() + ", " + control_value;
 		else
 			values[control_name] = control_value;

+ 8 - 8
Source/Controls/ElementFormControlDataSelect.cpp

@@ -38,15 +38,15 @@ namespace Controls {
 // Constructs a new ElementFormControlDataSelect.
 ElementFormControlDataSelect::ElementFormControlDataSelect(const Rml::Core::String& tag) : ElementFormControlSelect(tag)
 {
-	data_source = NULL;
+	data_source = nullptr;
 	initialised = false;
 }
 
 ElementFormControlDataSelect::~ElementFormControlDataSelect()
 {
-	if (data_source != NULL) {
+	if (data_source != nullptr) {
 		data_source->DetachListener(this);
-		data_source = NULL;
+		data_source = nullptr;
 	}
 }
 
@@ -79,9 +79,9 @@ void ElementFormControlDataSelect::OnAttributeChange(const Core::ElementAttribut
 
 	if (changed_attributes.find("source") != changed_attributes.end())
 	{
-		if (data_source != NULL) {
+		if (data_source != nullptr) {
 			data_source->DetachListener(this);
-			data_source = NULL;
+			data_source = nullptr;
 		}
 
 		initialised = false;
@@ -100,7 +100,7 @@ void ElementFormControlDataSelect::OnDataSourceDestroy(DataSource* _data_source)
 	if (data_source == _data_source)
 	{
 		data_source->DetachListener(this);
-		data_source = NULL;
+		data_source = nullptr;
 		data_table = "";
 
 		BuildOptions();
@@ -154,7 +154,7 @@ void ElementFormControlDataSelect::BuildOptions()
 {
 	widget->ClearOptions();
 
-	if (data_source == NULL)
+	if (data_source == nullptr)
 		return;
 
 	// Store the old selection value and index. These will be used to restore the selection to the
@@ -165,7 +165,7 @@ void ElementFormControlDataSelect::BuildOptions()
 	Rml::Core::String fields_attribute = GetAttribute<Rml::Core::String>("fields", "");
 	Rml::Core::String valuefield_attribute = GetAttribute<Rml::Core::String>("valuefield", "");
 	Rml::Core::String data_formatter_attribute = GetAttribute<Rml::Core::String>("formatter", "");
-	DataFormatter* data_formatter = NULL;
+	DataFormatter* data_formatter = nullptr;
 
 	// Process the attributes.
 	if (fields_attribute.empty())

+ 5 - 5
Source/Controls/ElementFormControlInput.cpp

@@ -44,7 +44,7 @@ ElementFormControlInput::ElementFormControlInput(const Rml::Core::String& tag) :
 	// OnAttributeChange will be called right after this, possible with a non-default type. Thus,
 	// creating the default InputTypeText here may result in it being destroyed in just a few moments.
 	// Instead, we create the InputTypeText in OnAttributeChange in the case where the type attribute has not been set.
-	type = NULL;
+	type = nullptr;
 }
 
 ElementFormControlInput::~ElementFormControlInput()
@@ -152,21 +152,21 @@ void ElementFormControlInput::OnPropertyChange(const Core::PropertyNameList& cha
 {
 	ElementFormControl::OnPropertyChange(changed_properties);
 
-	if (type != NULL)
+	if (type != nullptr)
 		type->OnPropertyChange(changed_properties);
 }
 
 // If we are the added element, this will pass the call onto our type handler.
 void ElementFormControlInput::OnChildAdd(Rml::Core::Element* child)
 {
-	if (child == this && type != NULL)
+	if (child == this && type != nullptr)
 		type->OnChildAdd();
 }
 
 // If we are the removed element, this will pass the call onto our type handler.
 void ElementFormControlInput::OnChildRemove(Rml::Core::Element* child)
 {
-	if (child == this && type != NULL)
+	if (child == this && type != nullptr)
 		type->OnChildRemove();
 }
 
@@ -174,7 +174,7 @@ void ElementFormControlInput::OnChildRemove(Rml::Core::Element* child)
 void ElementFormControlInput::ProcessDefaultAction(Core::Event& event)
 {
 	ElementFormControl::ProcessDefaultAction(event);
-	if(type != NULL)
+	if(type != nullptr)
 		type->ProcessDefaultAction(event);
 }
 

+ 9 - 9
Source/Controls/ElementFormControlSelect.cpp

@@ -49,7 +49,7 @@ ElementFormControlSelect::~ElementFormControlSelect()
 // Returns a string representation of the current value of the form control.
 Rml::Core::String ElementFormControlSelect::GetValue() const
 {
-	RMLUI_ASSERT(widget != NULL);
+	RMLUI_ASSERT(widget != nullptr);
 	return widget->GetValue();
 }
 
@@ -58,7 +58,7 @@ void ElementFormControlSelect::SetValue(const Rml::Core::String& value)
 {
 	OnUpdate();
 
-	RMLUI_ASSERT(widget != NULL);
+	RMLUI_ASSERT(widget != nullptr);
 	widget->SetValue(value);
 }
 
@@ -67,14 +67,14 @@ void ElementFormControlSelect::SetSelection(int selection)
 {
 	OnUpdate();
 
-	RMLUI_ASSERT(widget != NULL);
+	RMLUI_ASSERT(widget != nullptr);
 	widget->SetSelection(selection);
 }
 
 // Returns the index of the currently selected item.
 int ElementFormControlSelect::GetSelection() const
 {
-	RMLUI_ASSERT(widget != NULL);
+	RMLUI_ASSERT(widget != nullptr);
 	return widget->GetSelection();
 }
 
@@ -83,7 +83,7 @@ SelectOption* ElementFormControlSelect::GetOption(int index)
 {
 	OnUpdate();
 
-	RMLUI_ASSERT(widget != NULL);
+	RMLUI_ASSERT(widget != nullptr);
 	return widget->GetOption(index);
 }
 
@@ -92,7 +92,7 @@ int ElementFormControlSelect::GetNumOptions()
 {
 	OnUpdate();
 
-	RMLUI_ASSERT(widget != NULL);
+	RMLUI_ASSERT(widget != nullptr);
 	return widget->GetNumOptions();
 }
 
@@ -101,7 +101,7 @@ int ElementFormControlSelect::Add(const Rml::Core::String& rml, const Rml::Core:
 {
 	OnUpdate();
 
-	RMLUI_ASSERT(widget != NULL);
+	RMLUI_ASSERT(widget != nullptr);
 	return widget->AddOption(rml, value, before, false, selectable);
 }
 
@@ -110,7 +110,7 @@ void ElementFormControlSelect::Remove(int index)
 {
 	OnUpdate();
 
-	RMLUI_ASSERT(widget != NULL);
+	RMLUI_ASSERT(widget != nullptr);
 	widget->RemoveOption(index);
 }
 
@@ -119,7 +119,7 @@ void ElementFormControlSelect::RemoveAll()
 {
 	OnUpdate();
 
-	RMLUI_ASSERT(widget != NULL);
+	RMLUI_ASSERT(widget != nullptr);
 	widget->ClearOptions();
 }
 

+ 2 - 2
Source/Controls/ElementTabSet.cpp

@@ -45,7 +45,7 @@ ElementTabSet::~ElementTabSet()
 // Sets the specifed tab index's tab title RML.
 void ElementTabSet::SetTab(int tab_index, const Rml::Core::String& rml)
 {
-	Core::ElementPtr element = Core::Factory::InstanceElement(NULL, "*", "tab", Rml::Core::XMLAttributes());
+	Core::ElementPtr element = Core::Factory::InstanceElement(nullptr, "*", "tab", Rml::Core::XMLAttributes());
 	Core::Factory::InstanceElementText(element.get(), rml);
 	SetTab(tab_index, std::move(element));
 }
@@ -53,7 +53,7 @@ void ElementTabSet::SetTab(int tab_index, const Rml::Core::String& rml)
 // Sets the specifed tab index's tab panel RML.
 void ElementTabSet::SetPanel(int tab_index, const Rml::Core::String& rml)
 {
-	Core::ElementPtr element = Core::Factory::InstanceElement(NULL, "*", "panel", Rml::Core::XMLAttributes());
+	Core::ElementPtr element = Core::Factory::InstanceElement(nullptr, "*", "panel", Rml::Core::XMLAttributes());
 	Core::Factory::InstanceElementText(element.get(), rml);
 	SetPanel(tab_index, std::move(element));
 }

+ 2 - 2
Source/Controls/ElementTextSelection.cpp

@@ -34,7 +34,7 @@ namespace Controls {
 
 ElementTextSelection::ElementTextSelection(const Rml::Core::String& tag) : Rml::Core::Element(tag)
 {
-	widget = NULL;
+	widget = nullptr;
 }
 
 ElementTextSelection::~ElementTextSelection()
@@ -52,7 +52,7 @@ void ElementTextSelection::OnPropertyChange(const Rml::Core::PropertyNameList& c
 {
 	Element::OnPropertyChange(changed_properties);
 
-	if (widget == NULL)
+	if (widget == nullptr)
 		return;
 
 	// Check for a colour change.

+ 5 - 5
Source/Controls/InputTypeRadio.cpp

@@ -98,13 +98,13 @@ bool InputTypeRadio::GetIntrinsicDimensions(Rml::Core::Vector2f& dimensions)
 void InputTypeRadio::PopRadioSet()
 {
 	// Uncheck all other radio buttons with our name in the form.
-	ElementForm* form = NULL;
+	ElementForm* form = nullptr;
 	Core::Element* parent = element->GetParentNode();
-	while (parent != NULL &&
-		   (form = dynamic_cast< ElementForm* >(parent)) == NULL)
+	while (parent != nullptr &&
+		   (form = dynamic_cast< ElementForm* >(parent)) == nullptr)
 	   parent = parent->GetParentNode();
 
-	if (form != NULL)
+	if (form != nullptr)
 	{
 		Core::ElementList form_controls;
 		Core::ElementUtilities::GetElementsByTagName(form_controls, form, "input");
@@ -112,7 +112,7 @@ void InputTypeRadio::PopRadioSet()
 		for (size_t i = 0; i < form_controls.size(); ++i)
 		{
 			ElementFormControlInput* radio_control = dynamic_cast< ElementFormControlInput* >(form_controls[i]);
-			if (radio_control != NULL &&
+			if (radio_control != nullptr &&
 				element != radio_control &&
 				radio_control->GetAttribute< Rml::Core::String >("type", "text") == "radio" &&
 				radio_control->GetName() == element->GetName())

+ 1 - 1
Source/Controls/InputTypeSubmit.cpp

@@ -57,7 +57,7 @@ void InputTypeSubmit::ProcessDefaultAction(Core::Event& event)
 		while (parent)
 		{
 			ElementForm* form = dynamic_cast< ElementForm* >(parent);
-			if (form != NULL)
+			if (form != nullptr)
 			{
 				form->Submit(element->GetAttribute< Rml::Core::String >("name", ""), element->GetAttribute< Rml::Core::String >("value", ""));
 				return;

+ 1 - 1
Source/Controls/Lua/Controls.cpp

@@ -55,7 +55,7 @@ namespace Lua {
 //when the Interpreter starts.
 void RegisterTypes(lua_State* L)
 {
-    if(Rml::Core::Lua::Interpreter::GetLuaState() == NULL)
+    if(Rml::Core::Lua::Interpreter::GetLuaState() == nullptr)
     {
         Rml::Core::Log::Message(Rml::Core::Log::LT_ERROR,
             "In Rml::Controls::Lua::RegisterTypes: Tried to register the \'Controls\' types for Lua without first initializing the Interpreter.");

+ 3 - 3
Source/Controls/Lua/DataFormatter.cpp

@@ -88,18 +88,18 @@ int DataFormatterSetAttrFormatData(lua_State* L)
 
 Rml::Core::Lua::RegType<DataFormatter> DataFormatterMethods[] =
 {
-    { NULL, NULL },
+    { nullptr, nullptr },
 };
 
 luaL_Reg DataFormatterGetters[] =
 {
-    { NULL, NULL },
+    { nullptr, nullptr },
 };
 
 luaL_Reg DataFormatterSetters[] =
 {
     LUASETTER(DataFormatter,FormatData)
-    { NULL, NULL },
+    { nullptr, nullptr },
 };
 
 }

Some files were not shown because too many files changed in this diff