00001 /* centering5x3.h 00002 */ 00003 #ifndef OSL_CENTERING5X3_H 00004 #define OSL_CENTERING5X3_H 00005 00006 #include "osl/basic_type.h" 00007 #include "osl/container.h" 00008 00009 namespace osl 00010 { 00014 struct Centering5x3 00015 { 00016 struct Table 00017 { 00018 CArray<Square,Square::SIZE> centers; 00019 Table(); 00020 }; 00021 static const Square adjustCenterNaive(Square); 00022 static const Table table; 00023 static const Square adjustCenter(Square src) 00024 { 00025 return table.centers[src.index()]; 00026 } 00027 }; 00028 00029 } // namespace osl 00030 00031 #endif /* OSL_CENTERING5X3_H */ 00032 // ;;; Local Variables: 00033 // ;;; mode:c++ 00034 // ;;; c-basic-offset:2 00035 // ;;; coding:utf-8 00036 // ;;; End: