Skip to content

Commit bd7da6d

Browse files
authored
Merge pull request #51 from htfy96/master
Code style improvements
2 parents 7882778 + b8b2ed5 commit bd7da6d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+170
-170
lines changed

include/2darray.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
* Simulated by 1-dimension array.
1111
******************************************************************************/
1212

13-
#ifndef __2D_ARRAY_H__
14-
#define __2D_ARRAY_H__
13+
#ifndef ALGO_2D_ARRAY_H__
14+
#define ALGO_2D_ARRAY_H__
1515
#include <stdint.h>
1616
#include <stdlib.h>
1717

include/8queen.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
* http://en.wikipedia.org/wiki/Eight_queens_puzzle
1010
******************************************************************************/
1111

12-
#ifndef __8QUEEN_H__
13-
#define __8QUEEN_H__
12+
#ifndef ALGO_8QUEEN_H__
13+
#define ALGO_8QUEEN_H__
1414

1515
#include <stdio.h>
1616
#include <string.h>
@@ -84,4 +84,4 @@ namespace alg {
8484
};
8585
}
8686

87-
#endif //__8QUEEN_H__
87+
#endif //ALGO_8QUEEN_H__

include/astar.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
*
2020
******************************************************************************/
2121

22-
#ifndef __ASTAR_H__
23-
#define __ASTAR_H__
22+
#ifndef ALGO_ASTAR_H__
23+
#define ALGO_ASTAR_H__
2424

2525
#include <stdlib.h>
2626
#include <stdint.h>

include/avl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
*
2020
******************************************************************************/
2121

22-
#ifndef __AVL_H__
23-
#define __AVL_H__
22+
#ifndef ALGO_AVL_H__
23+
#define ALGO_AVL_H__
2424

2525
#include <iostream>
2626
#include <cmath>

include/bellman_ford.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
*
4545
******************************************************************************/
4646

47-
#ifndef __BELLMAN_FORD_H__
48-
#define __BELLMAN_FORD_H__
47+
#ifndef ALGO_BELLMAN_FORD_H__
48+
#define ALGO_BELLMAN_FORD_H__
4949

5050
#include <stdio.h>
5151
#include <stdlib.h>

include/binary_search_tree.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
*
1919
******************************************************************************/
2020

21-
#ifndef __BINARY_SEARCH_TREE_H__
22-
#define __BINARY_SEARCH_TREE_H__
21+
#ifndef ALGO_BINARY_SEARCH_TREE_H__
22+
#define ALGO_BINARY_SEARCH_TREE_H__
2323

2424
#include <stdlib.h>
2525
#include <stdint.h>
@@ -57,7 +57,7 @@ namespace alg {
5757
BST():m_root(NULL){};
5858

5959
~BST() {
60-
__destruct(m_root);
60+
destruct_(m_root);
6161
}
6262

6363
/**
@@ -159,10 +159,10 @@ namespace alg {
159159
}
160160

161161
private:
162-
void __destruct(treeNode *n) {
162+
void destruct_(treeNode *n) {
163163
if (n==NULL) return;
164-
__destruct(n->left);
165-
__destruct(n->right);
164+
destruct_(n->left);
165+
destruct_(n->right);
166166
delete n;
167167
}
168168

include/bitset.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
*
1212
******************************************************************************/
1313

14-
#ifndef __BIT_SET_H__
15-
#define __BIT_SET_H__
14+
#ifndef ALGO_BIT_SET_H__
15+
#define ALGO_BIT_SET_H__
1616

1717
#include <stdlib.h>
1818
#include <stdint.h>

include/bloom_filter.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
*
1919
******************************************************************************/
2020

21-
#ifndef __BLOOM_FILTER_H__
22-
#define __BLOOM_FILTER_H__
21+
#ifndef ALGO_BLOOM_FILTER_H__
22+
#define ALGO_BLOOM_FILTER_H__
2323

2424
#include <stdint.h>
2525
#include <stdbool.h>

include/btree.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
* http://en.wikipedia.org/wiki/B-tree
2525
******************************************************************************/
2626

27-
#ifndef __BTREE_H__
28-
#define __BTREE_H__
27+
#ifndef ALGO_BTREE_H__
28+
#define ALGO_BTREE_H__
2929

3030
#include <stdio.h>
3131
#include <assert.h>

include/dijkstra.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
*
2020
******************************************************************************/
2121

22-
#ifndef __DIJKSTRA_H__
23-
#define __DIJKSTRA_H__
22+
#ifndef ALGO_DIJKSTRA_H__
23+
#define ALGO_DIJKSTRA_H__
2424

2525
#include <stdio.h>
2626
#include <stdlib.h>

0 commit comments

Comments
 (0)