diff --git a/doc/source/_static/sidebar.js b/doc/source/_static/sidebar.js index 5ffeb127a12ac6c5af6dd8a8e055c8c2e2932a96..19650a36c436392040ba4af8ce37ebd638d315f6 100644 --- a/doc/source/_static/sidebar.js +++ b/doc/source/_static/sidebar.js @@ -97,9 +97,9 @@ $(function() { // find the height of the viewport to center the '<<' in the page var viewport_height; if (window.innerHeight) - viewport_height = window.innerHeight; + viewport_height = window.innerHeight; else - viewport_height = $(window).height(); + viewport_height = $(window).height(); var sidebar_offset = sidebar.offset().top; var sidebar_height = Math.max(bodywrapper.height(), sidebar.height()); sidebarbutton.find('span').css({ diff --git a/kwant/graph/c_slicer/bucket_list.h b/kwant/graph/c_slicer/bucket_list.h index 360dd6138e39de022cd7b67e59f1629cff96c86d..c95f24281fd4ff02e78b470ee511d2c58ef92baf 100644 --- a/kwant/graph/c_slicer/bucket_list.h +++ b/kwant/graph/c_slicer/bucket_list.h @@ -31,8 +31,8 @@ class bucket_list public: bucket_list(int _lower_bound, int _upper_bound, - vector<list<int>::iterator > &_reference_list, - const vector<int> &_index_list) : + vector<list<int>::iterator > &_reference_list, + const vector<int> &_index_list) : bucket(_upper_bound-_lower_bound+2, list<int>(0)), max_value(_lower_bound-1), lower_bound(_lower_bound), upper_bound(_upper_bound), @@ -62,8 +62,8 @@ class bucket_list bucket[max_value - lower_bound + 1].pop_front(); if(bucket[max_value - lower_bound + 1].empty()) { - while(bucket[--max_value - lower_bound + 1].empty()) - ; + while(bucket[--max_value - lower_bound + 1].empty()) + ; } } } @@ -114,7 +114,7 @@ class bucket_list } else if(bucket[max_value - lower_bound + 1].empty()) { while(bucket[--max_value - lower_bound + 1].empty()) - ; + ; } } @@ -131,7 +131,7 @@ class bucket_list } else if(bucket[max_value - lower_bound + 1].empty()) { while(bucket[--max_value - lower_bound + 1].empty()) - ; + ; } } @@ -150,7 +150,7 @@ class bucket_list if(bucket[max_value - lower_bound + 1].empty()) { while(bucket[--max_value - lower_bound + 1].empty()) - ; + ; } } @@ -181,12 +181,12 @@ class double_bucket_list public: double_bucket_list(int _lower_bound1, int _upper_bound1, - int _lower_bound2, int _upper_bound2, - vector<list<int>::iterator > &_reference_list, - const vector<int> &_index_list) : + int _lower_bound2, int _upper_bound2, + vector<list<int>::iterator > &_reference_list, + const vector<int> &_index_list) : bucket(_upper_bound1-_lower_bound1+2, - bucket_list(_lower_bound2, _upper_bound2, - _reference_list, _index_list)), + bucket_list(_lower_bound2, _upper_bound2, + _reference_list, _index_list)), max_value(_lower_bound1-1), lower_bound(_lower_bound1), upper_bound(_upper_bound1), reference_list(_reference_list), index_list(_index_list) @@ -214,8 +214,8 @@ class double_bucket_list bucket[max_value - lower_bound + 1].pop_front(); if(bucket[max_value - lower_bound + 1].empty()) { - while(bucket[--max_value - lower_bound + 1].empty()) - ; + while(bucket[--max_value - lower_bound + 1].empty()) + ; } } } @@ -248,7 +248,7 @@ class double_bucket_list } inline void rearrange_back(int _old_key1, int _old_key2, - int _new_key1, int _new_key2, int _data) + int _new_key1, int _new_key2, int _data) { if(_old_key1 == _new_key1) { bucket[_old_key1 - lower_bound +1].rearrange_back(_old_key2, _new_key2, _data); @@ -258,17 +258,17 @@ class double_bucket_list bucket[_new_key1 - lower_bound +1].push_back(_new_key2, _data); if(_new_key1 > max_value) { - max_value=_new_key1; + max_value=_new_key1; } else if(bucket[max_value - lower_bound + 1].empty()) { - while(bucket[--max_value - lower_bound + 1].empty()) - ; + while(bucket[--max_value - lower_bound + 1].empty()) + ; } } } inline void rearrange_front(int _old_key1, int _old_key2, - int _new_key1, int _new_key2, int _data) + int _new_key1, int _new_key2, int _data) { if(_old_key1 == _new_key1) { bucket[_old_key1 - lower_bound +1].rearrange_front(_old_key2, _new_key2, _data); @@ -278,17 +278,17 @@ class double_bucket_list bucket[_new_key1 - lower_bound +1].push_front(_new_key2, _data); if(_new_key1 > max_value) { - max_value=_new_key1; + max_value=_new_key1; } else if(bucket[max_value - lower_bound + 1].empty()) { - while(bucket[--max_value - lower_bound + 1].empty()) - ; + while(bucket[--max_value - lower_bound + 1].empty()) + ; } } } inline void rearrange_randomly(int _old_key1, int _old_key2, - int _new_key1, int _new_key2, int _data) + int _new_key1, int _new_key2, int _data) { if(rand()%2) rearrange_back(_old_key1, _old_key2, _new_key1, _new_key2, _data);