From: Brian Norris Date: Thu, 2 Aug 2012 17:25:17 +0000 (-0700) Subject: more reformatting/indentation X-Git-Tag: pldi2013~297 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=b118d83f84a47a6ac778ed8ea43030d477b0bc9c;p=model-checker.git more reformatting/indentation --- diff --git a/hashtable.h b/hashtable.h index 5d9e2d6..75d68f2 100644 --- a/hashtable.h +++ b/hashtable.h @@ -9,10 +9,10 @@ #include template - struct hashlistnode { - _Key key; - _Val val; - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *next; +struct hashlistnode { + _Key key; + _Val val; + struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *next; void * operator new(size_t size) { return _malloc(size); @@ -29,11 +29,12 @@ template class HashTable { public: @@ -118,13 +119,13 @@ template threshold) { + if (size > threshold) { //Resize - unsigned int newsize = capacity << 1; - resize(newsize); - } + unsigned int newsize = capacity << 1; + resize(newsize); + } - struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *ptr = table[(((_KeyInt)key) & mask)>>_Shift]; + struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *ptr = table[(((_KeyInt)key) & mask)>>_Shift]; size++; struct hashlistnode<_Key,_Val, _malloc, _calloc, _free> *search = ptr; diff --git a/model.cc b/model.cc index 2b2a5f0..b456c24 100644 --- a/model.cc +++ b/model.cc @@ -15,8 +15,7 @@ ModelChecker *model; /** @brief Constructor */ -ModelChecker::ModelChecker() - : +ModelChecker::ModelChecker() : /* Initialize default scheduler */ scheduler(new Scheduler()), /* First thread created will have id INITIAL_THREAD_ID */