Text in UTF8

This commit is contained in:
Louis 2015-02-25 15:38:16 +01:00
parent 13c953d5a7
commit 118ce83899

View file

@ -37,7 +37,7 @@ public:
{ {
if (_current + size > _base + _total_size) if (_current + size > _base + _total_size)
{ {
//TODO gérer les pbs de mémoire //TODO gerer les pbs de memoire
_total_size += ALLOC_BLOB; _total_size += ALLOC_BLOB;
_base = (char*)realloc(_base, _total_size); _base = (char*)realloc(_base, _total_size);
} }
@ -183,13 +183,13 @@ public:
struct local_var* blob = _map[name]; struct local_var* blob = _map[name];
if (blob == NULL) if (blob == NULL)
{ {
//TODO gérer les pbs de mémoire //TODO gerer les pbs de memoire
blob = (struct local_var*)malloc(size + sizeof(local_var)); blob = (struct local_var*)malloc(size + sizeof(local_var));
_map[name] = blob; _map[name] = blob;
} }
else if (size != blob->length) else if (size != blob->length)
{ {
//TODO gérer les pbs de mémoire //TODO gerer les pbs de memoire
blob = (struct local_var*)realloc(blob, size + sizeof(local_var)); blob = (struct local_var*)realloc(blob, size + sizeof(local_var));
_map[name] = blob; _map[name] = blob;
} }
@ -246,7 +246,6 @@ public:
bool erase(const string name) bool erase(const string name)
{ {
map<string, struct local_var*>::iterator i = _map.find(name); map<string, struct local_var*>::iterator i = _map.find(name);
if (i != _map.end()) if (i != _map.end())
{ {