JANITORIAL: Fix template definition whitespace

This commit is contained in:
Tarek Soliman 2012-02-10 21:14:48 -06:00
parent 0deea6fbf8
commit edc5249772
20 changed files with 48 additions and 48 deletions

View File

@ -211,7 +211,7 @@ static const Common::KeyCode jkeymap[] = {
};
// floating point. use sparingly
template <class T>
template<class T>
static inline T scalef(T in, float numerator, float denominator) {
return static_cast<float>(in) * numerator / denominator;
}

View File

@ -61,7 +61,7 @@ static inline GLfixed xdiv(int numerator, int denominator) {
return (numerator << 16) / denominator;
}
template <class T>
template<class T>
static T nextHigher2(T k) {
if (k == 0)
return 1;

View File

@ -60,14 +60,14 @@ struct IgnoreCase_Hash {
// case insensitve hashing, then only because one wants to use
// IgnoreCase_EqualTo, and then one has to specify a custom
// hash anyway.
template <>
template<>
struct Hash<String> {
uint operator()(const String& s) const {
return hashit(s.c_str());
}
};
template <>
template<>
struct Hash<const char *> {
uint operator()(const char *s) const {
return hashit(s);

View File

@ -35,7 +35,7 @@ namespace ListInternal {
NodeBase *_next;
};
template <typename T>
template<typename T>
struct Node : public NodeBase {
T _data;

View File

@ -30,7 +30,7 @@ namespace Common {
#define SYNC_AS(SUFFIX,TYPE,SIZE) \
template <typename T> \
template<typename T> \
void syncAs ## SUFFIX(T &val, Version minVersion = 0, Version maxVersion = kLastVersion) { \
if (_version < minVersion || _version > maxVersion) \
return; \

View File

@ -43,7 +43,7 @@ private:
* singleton class might be pure virtual (or "abstract" in Java terminology),
* and you specialise makeInstance to return an instance of a subclass.
*/
//template <class T>
//template<class T>
#if defined (_WIN32_WCE) || defined (_MSC_VER) || defined (__WINS__)
//FIXME evc4 and msvc7 doesn't like it as private member
public:

View File

@ -117,7 +117,7 @@ protected:
void restoreSeq(object_t *obj);
inline bool checkBoundary(int16 x, int16 y);
template <typename T>
template<typename T>
inline int sign(T a) { if ( a < 0) return -1; else return 1; }
};

View File

@ -2181,7 +2181,7 @@ void Screen::decodeFrameDelta(uint8 *dst, const uint8 *src, bool noXor) {
wrapped_decodeFrameDelta<false>(dst, src);
}
template <bool noXor>
template<bool noXor>
void Screen::wrapped_decodeFrameDelta(uint8 *dst, const uint8 *src) {
while (1) {
uint8 code = *src++;

View File

@ -219,7 +219,7 @@ protected:
void loadIndex(ResourceSlots *slots);
template <class T>
template<class T>
T *createResource(uint32 resType, int index) {
ResourceSlot *slot = getResourceSlot(resType, index);
if (!slot)

View File

@ -71,7 +71,7 @@ typedef Common::Array<const ProgramOpcode*> ProgramOpcodeSet;
#define DECLARE_UNQUALIFIED_INSTRUCTION_OPCODE(op) void instOp_##op(ProgramContext &)
template <class OpcodeSet>
template<class OpcodeSet>
class Exec {
protected:
OpcodeSet _opcodes;

View File

@ -795,7 +795,7 @@ bool Location::keepAnimation_br(AnimationPtr a) {
return keepZone_br(a);
}
template <class T>
template<class T>
void Location::freeList(Common::List<T> &list, bool removeAll, Common::MemFunc1<bool, T, Location> filter) {
typedef typename Common::List<T>::iterator iterator;
iterator it = list.begin();

View File

@ -178,7 +178,7 @@ protected:
bool keepAnimation_ns(AnimationPtr a);
bool keepAnimation_br(AnimationPtr a);
template <class T>
template<class T>
void freeList(Common::List<T> &list, bool removeAll, Common::MemFunc1<bool, T, Location> filter);
public:

View File

@ -66,7 +66,7 @@ void syncWithSerializer(Common::Serializer &s, T &obj) {
}
// By default, sync using syncWithSerializer, which in turn can easily be overloaded.
template <typename T>
template<typename T>
struct DefaultSyncer : Common::BinaryFunction<Common::Serializer, T, void> {
void operator()(Common::Serializer &s, T &obj) const {
//obj.saveLoadWithSerializer(s);
@ -87,7 +87,7 @@ struct DefaultSyncer : Common::BinaryFunction<Common::Serializer, T, void> {
*
* TODO: Add something like this for lists, queues....
*/
template <typename T, class Syncer = DefaultSyncer<T> >
template<typename T, class Syncer = DefaultSyncer<T> >
struct ArraySyncer : Common::BinaryFunction<Common::Serializer, T, void> {
void operator()(Common::Serializer &s, Common::Array<T> &arr) const {
uint len = arr.size();
@ -113,13 +113,13 @@ void syncArray(Common::Serializer &s, Common::Array<T> &arr) {
}
template <>
template<>
void syncWithSerializer(Common::Serializer &s, reg_t &obj) {
s.syncAsUint16LE(obj.segment);
s.syncAsUint16LE(obj.offset);
}
template <>
template<>
void syncWithSerializer(Common::Serializer &s, synonym_t &obj) {
s.syncAsUint16LE(obj.replaceant);
s.syncAsUint16LE(obj.replacement);
@ -247,7 +247,7 @@ void SegManager::saveLoadWithSerializer(Common::Serializer &s) {
}
template <>
template<>
void syncWithSerializer(Common::Serializer &s, Class &obj) {
s.syncAsSint32LE(obj.script);
syncWithSerializer(s, obj.reg);
@ -326,14 +326,14 @@ void Object::saveLoadWithSerializer(Common::Serializer &s) {
syncArray<reg_t>(s, _variables);
}
template <>
template<>
void syncWithSerializer(Common::Serializer &s, SegmentObjTable<Clone>::Entry &obj) {
s.syncAsSint32LE(obj.next_free);
syncWithSerializer<Object>(s, obj);
}
template <>
template<>
void syncWithSerializer(Common::Serializer &s, SegmentObjTable<List>::Entry &obj) {
s.syncAsSint32LE(obj.next_free);
@ -341,7 +341,7 @@ void syncWithSerializer(Common::Serializer &s, SegmentObjTable<List>::Entry &obj
syncWithSerializer(s, obj.last);
}
template <>
template<>
void syncWithSerializer(Common::Serializer &s, SegmentObjTable<Node>::Entry &obj) {
s.syncAsSint32LE(obj.next_free);
@ -352,7 +352,7 @@ void syncWithSerializer(Common::Serializer &s, SegmentObjTable<Node>::Entry &obj
}
#ifdef ENABLE_SCI32
template <>
template<>
void syncWithSerializer(Common::Serializer &s, SegmentObjTable<SciArray<reg_t> >::Entry &obj) {
s.syncAsSint32LE(obj.next_free);
@ -388,7 +388,7 @@ void syncWithSerializer(Common::Serializer &s, SegmentObjTable<SciArray<reg_t> >
}
}
template <>
template<>
void syncWithSerializer(Common::Serializer &s, SegmentObjTable<SciString>::Entry &obj) {
s.syncAsSint32LE(obj.next_free);
@ -416,7 +416,7 @@ void syncWithSerializer(Common::Serializer &s, SegmentObjTable<SciString>::Entry
}
#endif
template <typename T>
template<typename T>
void sync_Table(Common::Serializer &s, T &obj) {
s.syncAsSint32LE(obj.first_free);
s.syncAsSint32LE(obj.entries_used);

View File

@ -370,7 +370,7 @@ public:
#ifdef ENABLE_SCI32
template <typename T>
template<typename T>
class SciArray {
public:
SciArray() : _type(-1), _data(NULL), _size(0), _actualSize(0) { }

View File

@ -687,7 +687,7 @@ void Wiz::copyRawWizImage(uint8 *dst, const uint8 *src, int dstPitch, int dstTyp
}
#ifdef USE_RGB_COLOR
template <int type>
template<int type>
void Wiz::write16BitColor(uint8 *dstPtr, const uint8 *dataPtr, int dstType, const uint8 *xmapPtr) {
uint16 col = READ_LE_UINT16(dataPtr);
if (type == kWizXMap) {
@ -701,7 +701,7 @@ void Wiz::write16BitColor(uint8 *dstPtr, const uint8 *dataPtr, int dstType, cons
}
}
template <int type>
template<int type>
void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *xmapPtr) {
const uint8 *dataPtr, *dataPtrNext;
uint8 code;
@ -804,7 +804,7 @@ void Wiz::decompress16BitWizImage(uint8 *dst, int dstPitch, int dstType, const u
}
#endif
template <int type>
template<int type>
void Wiz::write8BitColor(uint8 *dstPtr, const uint8 *dataPtr, int dstType, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth) {
if (bitDepth == 2) {
if (type == kWizXMap) {
@ -833,7 +833,7 @@ void Wiz::write8BitColor(uint8 *dstPtr, const uint8 *dataPtr, int dstType, const
}
}
template <int type>
template<int type>
void Wiz::decompressWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth) {
const uint8 *dataPtr, *dataPtrNext;
uint8 code, *dstPtr, *dstPtrNext;
@ -942,7 +942,7 @@ template void Wiz::decompressWizImage<kWizXMap>(uint8 *dst, int dstPitch, int ds
template void Wiz::decompressWizImage<kWizRMap>(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth);
template void Wiz::decompressWizImage<kWizCopy>(uint8 *dst, int dstPitch, int dstType, const uint8 *src, const Common::Rect &srcRect, int flags, const uint8 *palPtr, const uint8 *xmapPtr, uint8 bitDepth);
template <int type>
template<int type>
void Wiz::decompressRawWizImage(uint8 *dst, int dstPitch, int dstType, const uint8 *src, int srcPitch, int w, int h, int transColor, const uint8 *palPtr, uint8 bitDepth) {
if (type == kWizRMap) {
assert(palPtr != 0);

View File

@ -507,7 +507,7 @@ void APU::Reset () {
Frame.Cycles = 1;
}
template <class T>
template<class T>
int step(T &obj, int sampcycles, uint frame_Cycles, int frame_Num) {
int samppos = 0;
while (sampcycles) {

View File

@ -60,7 +60,7 @@ static void saveOrLoadPtr(Common::ReadStream &stream, int16 *&p, int16 *base) {
p = base + offset;
}
template <class S>
template<class S>
static void saveOrLoad(S &s, Common::Rect &r) {
saveOrLoad(s, r.left);
saveOrLoad(s, r.top);
@ -68,13 +68,13 @@ static void saveOrLoad(S &s, Common::Rect &r) {
saveOrLoad(s, r.bottom);
}
template <class S>
template<class S>
static void saveOrLoad(S &s, SequenceEntry &seq) {
saveOrLoad(s, seq.sprNum);
saveOrLoad(s, seq.seqNum);
}
template <class S>
template<class S>
static void saveOrLoad(S &s, KeyChar &key) {
saveOrLoad(s, key.num);
saveOrLoad(s, key.flags);
@ -134,14 +134,14 @@ static void saveOrLoad(S &s, KeyChar &key) {
}
}
template <class S>
template<class S>
static void saveOrLoad(S &s, TalkEntry &entry) {
saveOrLoad(s, entry.otherKeyChar);
saveOrLoad(s, entry.talkingKeyChar);
saveOrLoad(s, entry.num);
}
template <class S>
template<class S>
static void saveOrLoad(S &s, ProgramHitBoxData &data) {
saveOrLoad(s, data.item);
saveOrLoad(s, data.talk);
@ -156,14 +156,14 @@ static void saveOrLoad(S &s, ProgramHitBoxData &data) {
}
}
template <class S>
template<class S>
static void saveOrLoad(S &s, Area &area) {
saveOrLoad(s, area.r);
saveOrLoad(s, area.srcX);
saveOrLoad(s, area.srcY);
}
template <class S>
template<class S>
static void saveOrLoad(S &s, ProgramBackgroundData &data) {
saveOrLoad(s, data.area);
saveOrLoad(s, data.type);
@ -172,7 +172,7 @@ static void saveOrLoad(S &s, ProgramBackgroundData &data) {
saveOrLoad(s, data.scaleDiv);
}
template <class S>
template<class S>
static void saveOrLoad(S &s, ProgramAreaData &data) {
saveOrLoad(s, data.area);
saveOrLoad(s, data.id);
@ -181,7 +181,7 @@ static void saveOrLoad(S &s, ProgramAreaData &data) {
saveOrLoad(s, data.animNext);
}
template <class S>
template<class S>
static void saveOrLoad(S &s, ProgramWalkData &data) {
saveOrLoad(s, data.point1);
saveOrLoad(s, data.point2);
@ -190,7 +190,7 @@ static void saveOrLoad(S &s, ProgramWalkData &data) {
saveOrLoad(s, data.area2);
}
template <class S>
template<class S>
static void saveOrLoad(S &s, ProgramPointData &data) {
saveOrLoad(s, data.x);
saveOrLoad(s, data.y);
@ -198,7 +198,7 @@ static void saveOrLoad(S &s, ProgramPointData &data) {
saveOrLoad(s, data.order);
}
template <class A>
template<class A>
static void saveOrLoadCommonArray(Common::WriteStream &stream, A &array) {
uint count = array.size();
assert(count < 0xFFFF);
@ -208,7 +208,7 @@ static void saveOrLoadCommonArray(Common::WriteStream &stream, A &array) {
}
}
template <class A>
template<class A>
static void saveOrLoadCommonArray(Common::ReadStream &stream, A &array) {
uint count = stream.readUint16LE();
if (count == array.size()) {
@ -218,7 +218,7 @@ static void saveOrLoadCommonArray(Common::ReadStream &stream, A &array) {
}
}
template <class S, class A>
template<class S, class A>
static void saveOrLoadStaticArray(S &s, A &array, uint count) {
for (uint i = 0; i < count; ++i) {
saveOrLoad(s, array[i]);

View File

@ -49,7 +49,7 @@ static void saveOrLoadInt(Common::ReadStream &stream, int &i) {
i = stream.readSint32LE();
}
template <class S>
template<class S>
void TuckerEngine::saveOrLoadGameStateData(S &s) {
for (int i = 0; i < kFlagsTableSize; ++i) {
saveOrLoadInt(s, _flagsTable[i]);

View File

@ -563,7 +563,7 @@ protected:
void updateSprite_locationNum81_1(int i);
void updateSprite_locationNum82(int i);
template <class S> void saveOrLoadGameStateData(S &s);
template<class S> void saveOrLoadGameStateData(S &s);
virtual Common::Error loadGameState(int num);
virtual Common::Error saveGameState(int num, const Common::String &description);
virtual bool canLoadGameStateCurrently();

View File

@ -70,7 +70,7 @@ namespace CxxTest
//
// The default ValueTraits class dumps up to 8 bytes as hex values
//
template <class T>
template<class T>
class ValueTraits
{
enum { MAX_BYTES = 8 };
@ -85,7 +85,7 @@ namespace CxxTest
// traits( T t )
// Creates an object of type ValueTraits<T>
//
template <class T>
template<class T>
inline ValueTraits<T> traits( T t )
{
return ValueTraits<T>( t );