aboutsummaryrefslogtreecommitdiff
path: root/src/framework/Utilities/ByteConverter.h
diff options
context:
space:
mode:
authormegamage <none@none>2008-11-06 16:10:28 -0600
committermegamage <none@none>2008-11-06 16:10:28 -0600
commit37d4724c9790b32b902d295b1de7b64f1e932292 (patch)
tree2318e67254429d1026cae5d28dd596078edbfc3e /src/framework/Utilities/ByteConverter.h
parent0aada07187e373ef9763bfb2ae6e6f706f56dfd4 (diff)
[svn] Merge from Mangos:
3c7ac5bd3e20c33a22ac57c5c3bac23a0798dc9e 2008-10-23 19:06:27 Some endianess related fixes and cleanups. By VladimirMangos. --HG-- branch : trunk
Diffstat (limited to 'src/framework/Utilities/ByteConverter.h')
-rw-r--r--src/framework/Utilities/ByteConverter.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/framework/Utilities/ByteConverter.h b/src/framework/Utilities/ByteConverter.h
index 49fe8a75ef4..5549a9d8100 100644
--- a/src/framework/Utilities/ByteConverter.h
+++ b/src/framework/Utilities/ByteConverter.h
@@ -10,12 +10,12 @@
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef TRINITY_BYTECONVERTER_H
@@ -48,12 +48,18 @@ namespace ByteConverter
#if TRINITY_ENDIAN == TRINITY_BIGENDIAN
template<typename T> inline void EndianConvert(T& val) { ByteConverter::apply<T>(&val); }
+template<typename T> inline void EndianConvertReverse(T&) { }
#else
template<typename T> inline void EndianConvert(T&) { }
+template<typename T> inline void EndianConvertReverse(T& val) { ByteConverter::apply<T>(&val); }
#endif
-template<typename T> inline void EndianConvert(T*) { }
+template<typename T> void EndianConvert(T*); // will generate link error
+template<typename T> void EndianConvertReverse(T*); // will generate link error
+
inline void EndianConvert(uint8&) { }
inline void EndianConvert( int8&) { }
+inline void EndianConvertReverse(uint8&) { }
+inline void EndianConvertReverse( int8&) { }
#endif