Switching to g++ and corresponding changes according to C++ requirements.

This commit is contained in:
Ruben Ayrapetyan
2015-01-16 12:53:41 +03:00
parent 557df54f9d
commit 005b5370fc
57 changed files with 883 additions and 666 deletions
+1 -1
View File
@@ -185,7 +185,7 @@ mem_run_try_to_give_memory_back_callbacks (mem_try_give_memory_back_severity_t s
bool
mem_is_heap_pointer (void *pointer) /**< pointer */
{
uint8_t *uint8_pointer = pointer;
uint8_t *uint8_pointer = (uint8_t*) pointer;
return (uint8_pointer >= mem_heap_area && uint8_pointer <= (mem_heap_area + MEM_HEAP_AREA_SIZE));
} /* mem_is_heap_pointer */
+2 -2
View File
@@ -1,4 +1,4 @@
/* Copyright 2014 Samsung Electronics Co., Ltd.
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -593,7 +593,7 @@ mem_heap_alloc_block (size_t size_in_bytes, /**< size of region to a
for (mem_try_give_memory_back_severity_t severity = MEM_TRY_GIVE_MEMORY_BACK_SEVERITY_LOW;
severity <= MEM_TRY_GIVE_MEMORY_BACK_SEVERITY_CRITICAL;
severity++)
severity = (mem_try_give_memory_back_severity_t) (severity + 1))
{
mem_run_try_to_give_memory_back_callbacks (severity);
+2 -2
View File
@@ -1,4 +1,4 @@
/* Copyright 2014 Samsung Electronics Co., Ltd.
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -89,7 +89,7 @@ extern void mem_heap_stats_reset_peak (void);
#define MEM_DEFINE_LOCAL_ARRAY(var_name, number, type) \
{ \
size_t var_name ## ___size = (size_t) (number) * sizeof (type); \
type *var_name = mem_heap_alloc_block (var_name ## ___size, MEM_HEAP_ALLOC_SHORT_TERM);
type *var_name = (type *) mem_heap_alloc_block (var_name ## ___size, MEM_HEAP_ALLOC_SHORT_TERM);
/**
* Free the previously defined local array variable, freeing corresponding block on the heap,
+4 -4
View File
@@ -1,4 +1,4 @@
/* Copyright 2014 Samsung Electronics Co., Ltd.
/* Copyright 2014-2015 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -137,7 +137,7 @@ mem_pools_alloc_longpath (void)
while (pool_state->first_free_chunk == MEM_POOL_CHUNKS_NUMBER)
{
prev_pool_state_p = pool_state;
pool_state = mem_decompress_pointer (pool_state->next_pool_cp);
pool_state = (mem_pool_state_t*) mem_decompress_pointer (pool_state->next_pool_cp);
JERRY_ASSERT(pool_state != NULL);
}
@@ -195,7 +195,7 @@ mem_pools_free (uint8_t *chunk_p) /**< pointer to the chunk */
while (!mem_pool_is_chunk_inside (pool_state, chunk_p))
{
prev_pool_state_p = pool_state;
pool_state = mem_decompress_pointer (pool_state->next_pool_cp);
pool_state = (mem_pool_state_t*) mem_decompress_pointer (pool_state->next_pool_cp);
JERRY_ASSERT(pool_state != NULL);
}
@@ -225,7 +225,7 @@ mem_pools_free (uint8_t *chunk_p) /**< pointer to the chunk */
}
else
{
mem_pools = mem_decompress_pointer (pool_state->next_pool_cp);
mem_pools = (mem_pool_state_t*) mem_decompress_pointer (pool_state->next_pool_cp);
}
}