diff Renderer/Engine/TextureHash.cc @ 1205:b8adf4e95e96 draft

add createStringFont()
author Takao YONAMINE <e095763@ie.u-ryukyu.ac.jp>
date Thu, 21 Jul 2011 18:56:08 +0900 (2011-07-21)
parents 5abf0ce8c71c
children
line wrap: on
line diff
--- a/Renderer/Engine/TextureHash.cc	Thu Jul 14 00:27:19 2011 +0900
+++ b/Renderer/Engine/TextureHash.cc	Thu Jul 21 18:56:08 2011 +0900
@@ -24,7 +24,7 @@
 }
 
 int
-TextureHash::hash_function(const char *key)
+TextureHash::hash_function(const unsigned char *key)
 {
     //float value = 0.0;
     int value = 0;
@@ -39,7 +39,7 @@
 int
 TextureHash::hash_regist(const char* key, int &id)
 {
-  int hash = hash_function(key);
+  int hash = hash_function((const unsigned char*)key);
   for (int i = 0; ; i++) {
     if (table[hash].tx_id == -1) {
       table[hash].key   = (char*)key;
@@ -58,7 +58,7 @@
 int
 TextureHash::sg_hash_regist(const char* key, int &id)
 {
-    int hash = hash_function(key);
+  int hash = hash_function((const unsigned char*)key);
 
     for (int i = 0; ; i++) {
         if (table[hash].tx_id == -1) {
@@ -78,7 +78,7 @@
 TextureHash::get_sgid(const char* key)
 {
 
-    int hash = hash_function(key);
+  int hash = hash_function((const unsigned char*)key);
     for (int i = 0; ; i++) {
         if (table[hash].tx_id == -1) {
             return -1;