summaryrefslogtreecommitdiff
path: root/src/util/serialize.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/serialize.h')
-rw-r--r--src/util/serialize.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/util/serialize.h b/src/util/serialize.h
index b356c484e..bb44c7f96 100644
--- a/src/util/serialize.h
+++ b/src/util/serialize.h
@@ -1,6 +1,6 @@
/*
-Minetest-c55
-Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
+Minetest
+Copyright (C) 2010-2013 celeron55, Perttu Ahola <celeron55@gmail.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -208,11 +208,12 @@ inline void writeARGB8(u8 *data, video::SColor p)
inline video::SColor readARGB8(const u8 *data)
{
- video::SColor p;
- p.setAlpha(readU8(&data[0]));
- p.setRed(readU8(&data[1]));
- p.setGreen(readU8(&data[2]));
- p.setBlue(readU8(&data[3]));
+ video::SColor p(
+ readU8(&data[0]),
+ readU8(&data[1]),
+ readU8(&data[2]),
+ readU8(&data[3])
+ );
return p;
}