[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kdeui/icons
From: Michael Pyne <mpyne () purinchu ! net>
Date: 2008-06-04 0:33:53
Message-ID: 1212539633.074118.2166.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 816485 by mpyne:
Can't use memcpy() on a struct with a ctor, even though no compiler will ever implement that wrong.
M +1 -17 kpixmapcache.cpp
--- trunk/KDE/kdelibs/kdeui/icons/kpixmapcache.cpp #816484:816485
@@ -116,13 +116,6 @@
static const char KPC_MAGIC[] = "KDE PIXMAP CACHE DEUX";
struct KPixmapCacheDataHeader
{
- KPixmapCacheDataHeader() :
- cacheVersion(0),
- size(sizeof(*this))
- {
- magic[0] = '\0'; // In case of inadvertent strcpy or something.
- }
-
// -1 from sizeof so we don't write out the trailing null. If you change
// the list of members change them in the KPixmapCacheIndexHeader as well!
char magic[sizeof(KPC_MAGIC) - 1];
@@ -132,15 +125,6 @@
struct KPixmapCacheIndexHeader
{
- KPixmapCacheIndexHeader() :
- cacheVersion(0),
- size(sizeof(*this)),
- cacheId(0),
- timestamp(0)
- {
- magic[0] = '\0'; // In case of inadvertent strcpy or something.
- }
-
// -1 from sizeof so we don't write out the trailing null.
// The follow are also in KPixmapCacheDataHeader
char magic[sizeof(KPC_MAGIC) - 1];
@@ -1232,7 +1216,7 @@
KPixmapCacheDataHeader dataHeader;
std::memcpy(dataHeader.magic, KPC_MAGIC, sizeof(dataHeader.magic));
dataHeader.cacheVersion = KPIXMAPCACHE_VERSION;
- // dataHeader knows its own size, we'll start it off at that.
+ dataHeader.size = sizeof dataHeader;
datafile.write(reinterpret_cast<char*>(&dataHeader), sizeof dataHeader);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic