Use nullptr instead of NULL in the code and documentation
This is a combination of running clang-tidy with modernize-use-nullptr check for some ports (GTK, X11, OSX) and manual changes to the ports for which it couldn't be used easily (MSW, DFB) and also manually updating the docs. Also replace NULL with null or nullptr in the comments as this is more consistent with the use of nullptr in the code and makes it simpler to grep for the remaining occurrences of NULL itself. And also use null in the assert messages. Only a few occurrences of "NULL" are still left in non-C files, mostly corresponding to unclear comments or string output which it might not be safe to change.
This commit is contained in:
parent
39ea524943
commit
4f4c5fcfdf
1844 changed files with 13721 additions and 13734 deletions
|
|
@ -51,7 +51,7 @@ wxBitmap DoCreateBitmapRGB(int w, int h, int bpp, bool withMask)
|
|||
dc.DrawRectangle(2, 2, bmp.GetWidth() - 2, bmp.GetHeight() - 2);
|
||||
}
|
||||
REQUIRE_FALSE(bmp.HasAlpha());
|
||||
REQUIRE(bmp.GetMask() == NULL);
|
||||
REQUIRE(bmp.GetMask() == nullptr);
|
||||
if ( withMask )
|
||||
{
|
||||
// Mask
|
||||
|
|
@ -71,7 +71,7 @@ wxBitmap DoCreateBitmapRGB(int w, int h, int bpp, bool withMask)
|
|||
}
|
||||
bmp.SetMask(new wxMask(bmask));
|
||||
REQUIRE_FALSE(bmp.HasAlpha());
|
||||
REQUIRE(bmp.GetMask() != NULL);
|
||||
REQUIRE(bmp.GetMask() != nullptr);
|
||||
}
|
||||
|
||||
return bmp;
|
||||
|
|
@ -136,7 +136,7 @@ wxBitmap CreateBitmapRGBA(int w, int h, bool withMask)
|
|||
}
|
||||
}
|
||||
REQUIRE(bmp.HasAlpha() == true);
|
||||
REQUIRE(bmp.GetMask() == NULL);
|
||||
REQUIRE(bmp.GetMask() == nullptr);
|
||||
if ( withMask )
|
||||
{
|
||||
// Mask
|
||||
|
|
@ -156,7 +156,7 @@ wxBitmap CreateBitmapRGBA(int w, int h, bool withMask)
|
|||
}
|
||||
bmp.SetMask(new wxMask(bmask));
|
||||
REQUIRE(bmp.HasAlpha() == true);
|
||||
REQUIRE(bmp.GetMask() != NULL);
|
||||
REQUIRE(bmp.GetMask() != nullptr);
|
||||
}
|
||||
|
||||
return bmp;
|
||||
|
|
@ -256,7 +256,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
// RGB bitmap
|
||||
wxBitmap bmp = CreateBitmapRGB(8, 8, false);
|
||||
REQUIRE_FALSE(bmp.HasAlpha());
|
||||
REQUIRE(bmp.GetMask() == NULL);
|
||||
REQUIRE(bmp.GetMask() == nullptr);
|
||||
|
||||
// Reference image
|
||||
wxImage image = bmp.ConvertToImage();
|
||||
|
|
@ -268,7 +268,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("Default GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDefaultRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
|
||||
|
|
@ -277,7 +277,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("GDI+ GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetGDIPlusRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_GDIPLUS
|
||||
|
|
@ -286,7 +286,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("Direct2D GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDirect2DRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_DIRECT2D
|
||||
|
|
@ -296,7 +296,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("Cairo GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetCairoRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_CAIRO
|
||||
|
|
@ -307,7 +307,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
// RGB bitmap
|
||||
wxBitmap bmp = CreateBitmapRGB(8, 8, true);
|
||||
REQUIRE_FALSE(bmp.HasAlpha());
|
||||
REQUIRE(bmp.GetMask() != NULL);
|
||||
REQUIRE(bmp.GetMask() != nullptr);
|
||||
|
||||
// Reference image
|
||||
wxImage image = bmp.ConvertToImage();
|
||||
|
|
@ -321,7 +321,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("Default GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDefaultRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
|
||||
|
|
@ -330,7 +330,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("GDI+ GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetGDIPlusRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_GDIPLUS
|
||||
|
|
@ -342,7 +342,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
return;
|
||||
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDirect2DRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_DIRECT2D
|
||||
|
|
@ -352,7 +352,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("Cairo GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetCairoRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_CAIRO
|
||||
|
|
@ -365,7 +365,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
wxBitmap bmp = CreateBitmapXRGB(8, 8, false);
|
||||
REQUIRE(bmp.GetDepth() == 32);
|
||||
REQUIRE_FALSE(bmp.HasAlpha());
|
||||
REQUIRE(bmp.GetMask() == NULL);
|
||||
REQUIRE(bmp.GetMask() == nullptr);
|
||||
|
||||
// Reference image
|
||||
wxImage image = bmp.ConvertToImage();
|
||||
|
|
@ -377,7 +377,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("Default GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDefaultRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
|
||||
|
|
@ -386,7 +386,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("GDI+ GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetGDIPlusRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_GDIPLUS
|
||||
|
|
@ -395,7 +395,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("Direct2D GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDirect2DRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_DIRECT2D
|
||||
|
|
@ -405,7 +405,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("Cairo GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetCairoRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_CAIRO
|
||||
|
|
@ -417,7 +417,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
wxBitmap bmp = CreateBitmapXRGB(8, 8, true);
|
||||
REQUIRE(bmp.GetDepth() == 32);
|
||||
REQUIRE_FALSE(bmp.HasAlpha());
|
||||
REQUIRE(bmp.GetMask() != NULL);
|
||||
REQUIRE(bmp.GetMask() != nullptr);
|
||||
|
||||
// Reference image
|
||||
wxImage image = bmp.ConvertToImage();
|
||||
|
|
@ -431,7 +431,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("Default GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDefaultRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
|
||||
|
|
@ -440,7 +440,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("GDI+ GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetGDIPlusRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_GDIPLUS
|
||||
|
|
@ -452,7 +452,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
return;
|
||||
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDirect2DRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_DIRECT2D
|
||||
|
|
@ -462,7 +462,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("Cairo GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetCairoRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_CAIRO
|
||||
|
|
@ -474,7 +474,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
// RGBA Bitmap
|
||||
wxBitmap bmp = CreateBitmapRGBA(8, 8, false);
|
||||
REQUIRE(bmp.HasAlpha() == true);
|
||||
REQUIRE(bmp.GetMask() == NULL);
|
||||
REQUIRE(bmp.GetMask() == nullptr);
|
||||
|
||||
// Reference image
|
||||
wxImage image = bmp.ConvertToImage();
|
||||
|
|
@ -486,7 +486,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("Default GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDefaultRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
|
||||
|
|
@ -495,7 +495,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("GDI+ GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetGDIPlusRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_GDIPLUS
|
||||
|
|
@ -504,7 +504,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("Direct2D GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDirect2DRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_DIRECT2D
|
||||
|
|
@ -514,7 +514,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("Cairo GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetCairoRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_CAIRO
|
||||
|
|
@ -525,7 +525,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
// RGBA Bitmap
|
||||
wxBitmap bmp = CreateBitmapRGBA(8, 8, true);
|
||||
REQUIRE(bmp.HasAlpha() == true);
|
||||
REQUIRE(bmp.GetMask() != NULL);
|
||||
REQUIRE(bmp.GetMask() != nullptr);
|
||||
|
||||
// Reference image
|
||||
wxImage image = bmp.ConvertToImage();
|
||||
|
|
@ -539,7 +539,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("Default GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDefaultRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
|
||||
|
|
@ -548,7 +548,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("GDI+ GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetGDIPlusRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_GDIPLUS
|
||||
|
|
@ -560,7 +560,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
return;
|
||||
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDirect2DRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_DIRECT2D
|
||||
|
|
@ -570,7 +570,7 @@ TEST_CASE("GraphicsBitmapTestCase::Create", "[graphbitmap][create]")
|
|||
SECTION("Cairo GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetCairoRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmap(gr, bmp, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_CAIRO
|
||||
|
|
@ -584,7 +584,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
// RGB bitmap
|
||||
wxBitmap bmp = CreateBitmapRGB(8, 8, false);
|
||||
REQUIRE_FALSE(bmp.HasAlpha());
|
||||
REQUIRE(bmp.GetMask() == NULL);
|
||||
REQUIRE(bmp.GetMask() == nullptr);
|
||||
|
||||
// Reference image
|
||||
const int subX = 1;
|
||||
|
|
@ -600,7 +600,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("Default GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDefaultRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
|
||||
|
|
@ -609,7 +609,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("GDI+ GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetGDIPlusRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_GDIPLUS
|
||||
|
|
@ -618,7 +618,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("Direct2D GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDirect2DRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_DIRECT2D
|
||||
|
|
@ -628,7 +628,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("Cairo GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetCairoRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_CAIRO
|
||||
|
|
@ -639,7 +639,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
// RGB bitmap
|
||||
wxBitmap bmp = CreateBitmapRGB(8, 8, true);
|
||||
REQUIRE_FALSE(bmp.HasAlpha());
|
||||
REQUIRE(bmp.GetMask() != NULL);
|
||||
REQUIRE(bmp.GetMask() != nullptr);
|
||||
|
||||
// Reference image
|
||||
const int subX = 2;
|
||||
|
|
@ -657,7 +657,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("Default GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDefaultRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
|
||||
|
|
@ -666,7 +666,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("GDI+ GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetGDIPlusRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_GDIPLUS
|
||||
|
|
@ -678,7 +678,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
return;
|
||||
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDirect2DRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_DIRECT2D
|
||||
|
|
@ -688,7 +688,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("Cairo GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetCairoRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_CAIRO
|
||||
|
|
@ -701,7 +701,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
wxBitmap bmp = CreateBitmapXRGB(8, 8, false);
|
||||
REQUIRE(bmp.GetDepth() == 32);
|
||||
REQUIRE_FALSE(bmp.HasAlpha());
|
||||
REQUIRE(bmp.GetMask() == NULL);
|
||||
REQUIRE(bmp.GetMask() == nullptr);
|
||||
|
||||
// Reference image
|
||||
const int subX = 1;
|
||||
|
|
@ -717,7 +717,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("Default GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDefaultRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
|
||||
|
|
@ -726,7 +726,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("GDI+ GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetGDIPlusRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_GDIPLUS
|
||||
|
|
@ -735,7 +735,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("Direct2D GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDirect2DRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_DIRECT2D
|
||||
|
|
@ -745,7 +745,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("Cairo GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetCairoRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_CAIRO
|
||||
|
|
@ -757,7 +757,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
wxBitmap bmp = CreateBitmapXRGB(8, 8, true);
|
||||
REQUIRE(bmp.GetDepth() == 32);
|
||||
REQUIRE_FALSE(bmp.HasAlpha());
|
||||
REQUIRE(bmp.GetMask() != NULL);
|
||||
REQUIRE(bmp.GetMask() != nullptr);
|
||||
|
||||
// Reference image
|
||||
const int subX = 2;
|
||||
|
|
@ -791,7 +791,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("Default GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDefaultRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
|
||||
|
|
@ -800,7 +800,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("GDI+ GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetGDIPlusRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_GDIPLUS
|
||||
|
|
@ -812,7 +812,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
return;
|
||||
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDirect2DRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_DIRECT2D
|
||||
|
|
@ -822,7 +822,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("Cairo GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetCairoRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_CAIRO
|
||||
|
|
@ -834,7 +834,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
// RGBA Bitmap
|
||||
wxBitmap bmp = CreateBitmapRGBA(8, 8, false);
|
||||
REQUIRE(bmp.HasAlpha() == true);
|
||||
REQUIRE(bmp.GetMask() == NULL);
|
||||
REQUIRE(bmp.GetMask() == nullptr);
|
||||
|
||||
// Reference image
|
||||
const int subX = 2;
|
||||
|
|
@ -850,7 +850,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("Default GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDefaultRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
|
||||
|
|
@ -859,7 +859,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("GDI+ GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetGDIPlusRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_GDIPLUS
|
||||
|
|
@ -868,7 +868,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("Direct2D GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDirect2DRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_DIRECT2D
|
||||
|
|
@ -878,7 +878,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("Cairo GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetCairoRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_CAIRO
|
||||
|
|
@ -889,7 +889,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
// RGBA Bitmap
|
||||
wxBitmap bmp = CreateBitmapRGBA(8, 8, true);
|
||||
REQUIRE(bmp.HasAlpha() == true);
|
||||
REQUIRE(bmp.GetMask() != NULL);
|
||||
REQUIRE(bmp.GetMask() != nullptr);
|
||||
|
||||
// Reference image
|
||||
const int subX = 2;
|
||||
|
|
@ -907,7 +907,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("Default GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDefaultRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
|
||||
|
|
@ -916,7 +916,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("GDI+ GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetGDIPlusRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_GDIPLUS
|
||||
|
|
@ -928,7 +928,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
return;
|
||||
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDirect2DRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_DIRECT2D
|
||||
|
|
@ -938,7 +938,7 @@ TEST_CASE("GraphicsBitmapTestCase::SubBitmap", "[graphbitmap][subbitmap][create]
|
|||
SECTION("Cairo GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetCairoRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphSubBitmap(gr, bmp, subX, subY, subW, subH, image);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_CAIRO
|
||||
|
|
@ -967,7 +967,7 @@ TEST_CASE("GraphicsBitmapTestCase::CreateFromImage", "[graphbitmap][create][from
|
|||
SECTION("Default GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDefaultRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmapFromImage(gr, img);
|
||||
}
|
||||
|
||||
|
|
@ -976,7 +976,7 @@ TEST_CASE("GraphicsBitmapTestCase::CreateFromImage", "[graphbitmap][create][from
|
|||
SECTION("GDI+ GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetGDIPlusRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmapFromImage(gr, img);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_GDIPLUS
|
||||
|
|
@ -985,7 +985,7 @@ TEST_CASE("GraphicsBitmapTestCase::CreateFromImage", "[graphbitmap][create][from
|
|||
SECTION("Direct2D GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDirect2DRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmapFromImage(gr, img);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_DIRECT2D
|
||||
|
|
@ -995,7 +995,7 @@ TEST_CASE("GraphicsBitmapTestCase::CreateFromImage", "[graphbitmap][create][from
|
|||
SECTION("Cairo GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetCairoRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmapFromImage(gr, img);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_CAIRO
|
||||
|
|
@ -1019,7 +1019,7 @@ TEST_CASE("GraphicsBitmapTestCase::CreateFromImage", "[graphbitmap][create][from
|
|||
SECTION("Default GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDefaultRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmapFromImage(gr, img);
|
||||
}
|
||||
|
||||
|
|
@ -1028,7 +1028,7 @@ TEST_CASE("GraphicsBitmapTestCase::CreateFromImage", "[graphbitmap][create][from
|
|||
SECTION("GDI+ GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetGDIPlusRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmapFromImage(gr, img);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_GDIPLUS
|
||||
|
|
@ -1037,7 +1037,7 @@ TEST_CASE("GraphicsBitmapTestCase::CreateFromImage", "[graphbitmap][create][from
|
|||
SECTION("Direct2D GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDirect2DRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmapFromImage(gr, img);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_DIRECT2D
|
||||
|
|
@ -1047,7 +1047,7 @@ TEST_CASE("GraphicsBitmapTestCase::CreateFromImage", "[graphbitmap][create][from
|
|||
SECTION("Cairo GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetCairoRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmapFromImage(gr, img);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_CAIRO
|
||||
|
|
@ -1076,7 +1076,7 @@ TEST_CASE("GraphicsBitmapTestCase::CreateFromImage", "[graphbitmap][create][from
|
|||
SECTION("Default GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDefaultRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmapFromImage(gr, img);
|
||||
}
|
||||
|
||||
|
|
@ -1085,7 +1085,7 @@ TEST_CASE("GraphicsBitmapTestCase::CreateFromImage", "[graphbitmap][create][from
|
|||
SECTION("GDI+ GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetGDIPlusRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmapFromImage(gr, img);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_GDIPLUS
|
||||
|
|
@ -1094,7 +1094,7 @@ TEST_CASE("GraphicsBitmapTestCase::CreateFromImage", "[graphbitmap][create][from
|
|||
SECTION("Direct2D GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDirect2DRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmapFromImage(gr, img);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_DIRECT2D
|
||||
|
|
@ -1104,7 +1104,7 @@ TEST_CASE("GraphicsBitmapTestCase::CreateFromImage", "[graphbitmap][create][from
|
|||
SECTION("Cairo GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetCairoRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmapFromImage(gr, img);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_CAIRO
|
||||
|
|
@ -1134,7 +1134,7 @@ TEST_CASE("GraphicsBitmapTestCase::CreateFromImage", "[graphbitmap][create][from
|
|||
SECTION("Default GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDefaultRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmapFromImage(gr, img);
|
||||
}
|
||||
|
||||
|
|
@ -1143,7 +1143,7 @@ TEST_CASE("GraphicsBitmapTestCase::CreateFromImage", "[graphbitmap][create][from
|
|||
SECTION("GDI+ GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetGDIPlusRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmapFromImage(gr, img);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_GDIPLUS
|
||||
|
|
@ -1152,7 +1152,7 @@ TEST_CASE("GraphicsBitmapTestCase::CreateFromImage", "[graphbitmap][create][from
|
|||
SECTION("Direct2D GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetDirect2DRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmapFromImage(gr, img);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_DIRECT2D
|
||||
|
|
@ -1162,7 +1162,7 @@ TEST_CASE("GraphicsBitmapTestCase::CreateFromImage", "[graphbitmap][create][from
|
|||
SECTION("Cairo GC")
|
||||
{
|
||||
wxGraphicsRenderer* gr = wxGraphicsRenderer::GetCairoRenderer();
|
||||
REQUIRE(gr != NULL);
|
||||
REQUIRE(gr != nullptr);
|
||||
CheckCreateGraphBitmapFromImage(gr, img);
|
||||
}
|
||||
#endif // wxUSE_GRAPHICS_CAIRO
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue