Skip to content

Refactoring

MoonPadUSer edited this page Jun 19, 2020 · 4 revisions

List of refactoring tasks

  • Replace internal vector with std::vector
  • Replace smallvector by std::vector
  • Split files so that each class have 1 header and 1 implementation
  • Use containers or unique_ptr to remove all new/mallocs
  • Remove internal implementations of new/delete/swap/...
  • Remove most macros
    • loop(v,m)
    • loopi(m)
    • loopj(m)
    • loopk(m)
    • loopl(m)
    • looprev(v,m)
    • loopirev(m)
    • loopjrev(m)
    • loopkrev(m)
    • looplrev(m)
    • loopv(v)
    • loopvj(v)
    • loopvk(v)
    • loopvrev(v)
    • loopvjrev(v)
    • loopvkrev(v)
    • m_edit(a)
  • Move functions into their struct/classes when it makes sense
    • struct clientinfo
  • clean compilers'warnings:
    • make clang --analyze quiet
    • make clang -Weverything quiet when disabling some warnings
    • make gcc -Wextra quiet when disabling some warnings
  • move all includes at start of the file
  • build common interfaces for game modes. Affected targets may be:
    • game/ai.cpp
    • game/waypoint.cpp
Clone this wiki locally