Changeset 181 for trunk/src/framework

Show
Ignore:
Timestamp:
11/19/08 13:44:02 (17 years ago)
Author:
yumileroy
Message:

[svn] Merge from Mangos:
3c7ac5bd3e20c33a22ac57c5c3bac23a0798dc9e 2008-10-23 19:06:27
Some endianess related fixes and cleanups. By VladimirMangos?.

Original author: megamage
Date: 2008-11-06 16:10:28-06:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/framework/Utilities/ByteConverter.h

    r102 r181  
    1111 * This program is distributed in the hope that it will be useful, 
    1212 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
     13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
    1414 * GNU General Public License for more details. 
    1515 * 
    1616 * You should have received a copy of the GNU General Public License 
    1717 * along with this program; if not, write to the Free Software 
    18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 
     18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
    1919 */ 
    2020 
     
    4949#if TRINITY_ENDIAN == TRINITY_BIGENDIAN 
    5050template<typename T> inline void EndianConvert(T& val) { ByteConverter::apply<T>(&val); } 
     51template<typename T> inline void EndianConvertReverse(T&) { } 
    5152#else 
    5253template<typename T> inline void EndianConvert(T&) { } 
     54template<typename T> inline void EndianConvertReverse(T& val) { ByteConverter::apply<T>(&val); } 
    5355#endif 
    5456 
    55 template<typename T> inline void EndianConvert(T*) { } 
     57template<typename T> void EndianConvert(T*);         // will generate link error 
     58template<typename T> void EndianConvertReverse(T*);  // will generate link error 
     59 
    5660inline void EndianConvert(uint8&) { } 
    5761inline void EndianConvert( int8&) { } 
     62inline void EndianConvertReverse(uint8&) { } 
     63inline void EndianConvertReverse( int8&) { } 
    5864 
    5965#endif