aboutsummaryrefslogtreecommitdiffhomepage
path: root/qt/ScintillaEditBase/PlatQt.cpp
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2020-07-13 09:59:46 +1000
committerNeil <nyamatongwe@gmail.com>2020-07-13 09:59:46 +1000
commitd5c5bce72040af804a00a014cbce453588b7b231 (patch)
treec14977e175974d1f8e4f3d348b564a9147285b1a /qt/ScintillaEditBase/PlatQt.cpp
parentcd445067448bd28a07636f2d8dc065aa662823de (diff)
downloadscintilla-mirror-d5c5bce72040af804a00a014cbce453588b7b231.tar.gz
Minor warning fixes. 0 -> nullptr and static_cast -> dynamic_cast.
Diffstat (limited to 'qt/ScintillaEditBase/PlatQt.cpp')
-rw-r--r--qt/ScintillaEditBase/PlatQt.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/qt/ScintillaEditBase/PlatQt.cpp b/qt/ScintillaEditBase/PlatQt.cpp
index 43e15563f..b09812236 100644
--- a/qt/ScintillaEditBase/PlatQt.cpp
+++ b/qt/ScintillaEditBase/PlatQt.cpp
@@ -214,7 +214,7 @@ void SurfaceImpl::InitPixMap(int width,
if (height < 1) height = 1;
deviceOwned = true;
device = new QPixmap(width, height);
- SurfaceImpl *psurfOther = static_cast<SurfaceImpl *>(surface);
+ SurfaceImpl *psurfOther = dynamic_cast<SurfaceImpl *>(surface);
SetUnicodeMode(psurfOther->unicodeMode);
SetDBCSMode(psurfOther->codePage);
}
@@ -320,7 +320,7 @@ void SurfaceImpl::FillRectangle(PRectangle rc, ColourDesired back)
void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern)
{
// Tile pattern over rectangle
- SurfaceImpl *surface = static_cast<SurfaceImpl *>(&surfacePattern);
+ SurfaceImpl *surface = dynamic_cast<SurfaceImpl *>(&surfacePattern);
// Currently assumes 8x8 pattern
int widthPat = 8;
int heightPat = 8;
@@ -432,7 +432,7 @@ void SurfaceImpl::Ellipse(PRectangle rc,
void SurfaceImpl::Copy(PRectangle rc, Point from, Surface &surfaceSource)
{
- SurfaceImpl *source = static_cast<SurfaceImpl *>(&surfaceSource);
+ SurfaceImpl *source = dynamic_cast<SurfaceImpl *>(&surfaceSource);
QPixmap *pixmap = static_cast<QPixmap *>(source->GetPaintDevice());
GetPainter()->drawPixmap(rc.left, rc.top, *pixmap, from.x, from.y, -1, -1);