mirror of
https://github.com/zeldaret/tp
synced 2026-05-30 00:47:05 -04:00
221f40e609
* add "global.h" to files that use it * add MSL_C includes to files that use them * remove dolphin includes from headers that don't need them * remove JSupport includes from headers that don't need them * remove JKernel includes from headers that don't need them * remove JUtility includes from headers that don't need them * remove J3D includes from headers that don't need them * remove J2D includes from headers that don't need them * remove JAudio2 includes from headers that don't need them * remove Z2AudioLib includes from headers that don't need them * remove JMessage includes from headers that don't need them * remove JParticle includes from headers that don't need them * remove SComponent includes from headers that don't need them * remove dol includes from headers that don't need them * sort includes
21 lines
540 B
C++
21 lines
540 B
C++
#ifndef SEARCH_H
|
|
#define SEARCH_H
|
|
|
|
#include "dolphin/types.h"
|
|
#include "global.h"
|
|
|
|
namespace JGadget {
|
|
|
|
//! @todo: mangled name isn't correct, fix this
|
|
//! Current: toValueFromIndex<PFdd_d>__7JGadgetFiPCPFdd_dUlRCPFdd_d
|
|
//! Target: toValueFromIndex<PFdd_d>__7JGadgetFiPCPFdd_dUlRCPFdd_d_RCPFdd_d
|
|
template <typename T>
|
|
inline const T& toValueFromIndex(int idx, const T* pValue, u32 count, const T& fallback) {
|
|
ASSERT(pValue != NULL);
|
|
return (idx >= count) ? fallback : pValue[idx];
|
|
}
|
|
|
|
} // namespace JGadget
|
|
|
|
#endif /* SEARCH_H */
|