some cleunup
Hi Junhao Li,
Thanks a lot for contributing this code! I can tell you it will be used to model traffic flow in the Netherlands.
I did find some places in which the code could be cleaned up a bit, and collected them in this branch. I hope it will be of use to you and others as well.
The main things it addresses:
-
corrected
intentstatements (inout --> in) -
corrected
.not. associated(this%node_ptr) .or. .not. allocated(this%node_ptr%kv)statement (Fortran is not guaranteed to evaluate from left to right) -
deleted redundant
deallocatestatements -
simplified
node_get -
greatly simplified the
cleanprocedures. Furthermore, memory is now freed automatically by destructors (aka finalizers), so the user does not need to callcleanon the hash table. -
non_overridableprocedures (also helps the compiler to know what exact method you're calling at compile time) -
Some more flags in the Makefile (maybe you don't want those)