Skip to content

Commit 989108e

Browse files
committed
[Fix] Remove unnecessary const qualifier from pass-by-value parameters
1 parent f249ad3 commit 989108e

File tree

1 file changed

+4
-4
lines changed
  • libCacheSim/cache/eviction

1 file changed

+4
-4
lines changed

libCacheSim/cache/eviction/LRU.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ extern "C" {
2727
static void LRU_free(cache_t *cache);
2828
static bool LRU_get(cache_t *cache, const request_t *req);
2929
static cache_obj_t *LRU_find(cache_t *cache, const request_t *req,
30-
const bool update_cache);
30+
bool update_cache);
3131
static cache_obj_t *LRU_insert(cache_t *cache, const request_t *req);
3232
static cache_obj_t *LRU_to_evict(cache_t *cache, const request_t *req);
3333
static void LRU_evict(cache_t *cache, const request_t *req);
34-
static bool LRU_remove(cache_t *cache, const obj_id_t obj_id);
34+
static bool LRU_remove(cache_t *cache, obj_id_t obj_id);
3535
static void LRU_print_cache(const cache_t *cache);
3636

3737
// ***********************************************************************
@@ -132,7 +132,7 @@ static bool LRU_get(cache_t *cache, const request_t *req) {
132132
* @return true on hit, false on miss
133133
*/
134134
static cache_obj_t *LRU_find(cache_t *cache, const request_t *req,
135-
const bool update_cache) {
135+
bool update_cache) {
136136
LRU_params_t *params = (LRU_params_t *)cache->eviction_params;
137137
cache_obj_t *cache_obj = cache_find_base(cache, req, update_cache);
138138

@@ -256,7 +256,7 @@ static void LRU_remove_obj(cache_t *cache, cache_obj_t *obj) {
256256
* @return true if the object is removed, false if the object is not in the
257257
* cache
258258
*/
259-
static bool LRU_remove(cache_t *cache, const obj_id_t obj_id) {
259+
static bool LRU_remove(cache_t *cache, obj_id_t obj_id) {
260260
cache_obj_t *obj = hashtable_find_obj_id(cache->hashtable, obj_id);
261261
if (obj == NULL) {
262262
return false;

0 commit comments

Comments
 (0)