aboutsummaryrefslogtreecommitdiff
path: root/launcher
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2022-10-23 14:28:33 -0300
committerGitHub <noreply@github.com>2022-10-23 14:28:33 -0300
commit7f441f5b878677df0a1f12b62a132959402c6cd0 (patch)
tree9b43dcd20d4a2727ee7c108d5cb1247ef4ba3047 /launcher
parent29e6e170cc73c39d816a4b5e857849aa6329b552 (diff)
parent56ae4e5b6ad984d4c9569cb024d807bd695555a6 (diff)
downloadPrismLauncher-7f441f5b878677df0a1f12b62a132959402c6cd0.tar.gz
PrismLauncher-7f441f5b878677df0a1f12b62a132959402c6cd0.tar.bz2
PrismLauncher-7f441f5b878677df0a1f12b62a132959402c6cd0.zip
Merge pull request #228 from bensuperpc/change_cast
Diffstat (limited to 'launcher')
-rw-r--r--launcher/GZip.cpp4
-rw-r--r--launcher/HoeDown.h2
-rw-r--r--launcher/tasks/Task.cpp2
3 files changed, 4 insertions, 4 deletions
diff --git a/launcher/GZip.cpp b/launcher/GZip.cpp
index 067104cf..e36dc8a4 100644
--- a/launcher/GZip.cpp
+++ b/launcher/GZip.cpp
@@ -72,7 +72,7 @@ bool GZip::unzip(const QByteArray &compressedBytes, QByteArray &uncompressedByte
uncompLength *= 2;
}
- strm.next_out = (Bytef *)(uncompressedBytes.data() + strm.total_out);
+ strm.next_out = reinterpret_cast<Bytef *>((uncompressedBytes.data() + strm.total_out));
strm.avail_out = uncompLength - strm.total_out;
// Inflate another chunk.
@@ -129,7 +129,7 @@ bool GZip::zip(const QByteArray &uncompressedBytes, QByteArray &compressedBytes)
{
compressedBytes.resize(compressedBytes.size() * 2);
}
- zs.next_out = (Bytef *) (compressedBytes.data() + offset);
+ zs.next_out = reinterpret_cast<Bytef*>((compressedBytes.data() + offset));
temp = zs.avail_out = compressedBytes.size() - offset;
ret = deflate(&zs, Z_FINISH);
offset += temp - zs.avail_out;
diff --git a/launcher/HoeDown.h b/launcher/HoeDown.h
index b9e06ffb..cb62de6c 100644
--- a/launcher/HoeDown.h
+++ b/launcher/HoeDown.h
@@ -42,7 +42,7 @@ public:
}
void put(QByteArray input)
{
- hoedown_buffer_put(buf, (uint8_t *) input.data(), input.size());
+ hoedown_buffer_put(buf, reinterpret_cast<uint8_t *>(input.data()), input.size());
}
const uint8_t * data() const
{
diff --git a/launcher/tasks/Task.cpp b/launcher/tasks/Task.cpp
index b4babdd4..9ea1bb26 100644
--- a/launcher/tasks/Task.cpp
+++ b/launcher/tasks/Task.cpp
@@ -153,7 +153,7 @@ QString Task::describe()
auto name = objectName();
if(name.isEmpty())
{
- out << QString("0x%1").arg((quintptr)this, 0, 16);
+ out << QString("0x%1").arg(reinterpret_cast<quintptr>(this), 0, 16);
}
else
{