aboutsummaryrefslogtreecommitdiff
path: root/TODO/refactoring.md
diff options
context:
space:
mode:
Diffstat (limited to 'TODO/refactoring.md')
-rw-r--r--TODO/refactoring.md28
1 files changed, 28 insertions, 0 deletions
diff --git a/TODO/refactoring.md b/TODO/refactoring.md
new file mode 100644
index 0000000..eedbd20
--- /dev/null
+++ b/TODO/refactoring.md
@@ -0,0 +1,28 @@
1# Refactoring
2
3## Init functions
4
5* All .h files should have a single init function.
6* This function should initialize everything that this module needs, including
7 calling the init functions of the modules it depends on.
8* To avoid multiple initialization of the same module, each should have a
9 static bool initialized variable.
10* Everything that a module needs should be initialized by init(), avoid
11 initializing stuff when solving. Exception: pruning tables, move tables.
12* Most functions should generate some tables and save them to disk.
13* Init functions should have a consistent structure (e.g. the way they check
14 if the tables are already generated should be the same).
15
16## Cube types
17
18* Get rid of cubetype.h, split type definitionss into the other modules.
19* Every type definition should be in the most fundamental module that needs it.
20
21## Code style
22
23* Stop declaring all variables at the beginning of a function.
24* Remove variable names from prototypes.
25* Sort function implementations alphabetically, ignore static vs non static.
26* Rename functions and variable to have a consistent naming scheme.
27* Functions that copy data: swap src and dest, follow memcpy standard.
28* Read style(9) and decide what to implement.

Generated with cgit - Back to sebastiano.tronto.net