Skip to content

Conversation

@Mogball
Copy link
Contributor

@Mogball Mogball commented Nov 20, 2017

Went through and cleaned up the code a bit.
Summary of changes:

  • Renamed Allocator --> __Allocator because it is used only internally
  • Reorganized imports/removed unused imports
  • Renamed utilities --> utility
  • Moved Comparator back into stl (Equal and Hash are also there)
  • Renamed some functions to start with lowercase
  • Removed move constructors/assignment operators for types with no dynamic memory
  • Replaced manual lvalue and rvalue function signatures with universal references
  • Replaced casts where possible with static_cast
  • Replaced our custom str_cmp with the string.h version
  • Replaced some uint16_t with size_type

edit:

  • Rewrote a bit of Tuple to be compatible with C++11 standard

@dhillondeep
Copy link
Contributor

Are we keeping move ctors and operators only or we still including copy ctors and operators?

@Mogball
Copy link
Contributor Author

Mogball commented Nov 20, 2017

move constructors and assignment operators are only really useful for objects with dynamically allocated resources, I kinda went bonkers and added them for a bunch of stuff that didn't need them. Anything that has dynamically allocated (i.e. malloc) resources should have move constructor and assignment operators. The large data structures (lists, maps, sets, trees) will have copying disabled. We'll use discretion for copy constructors on small things with dynamically allocated resources.

@dhillondeep
Copy link
Contributor

Oh true makes sense

@dhillondeep dhillondeep merged commit 51bedc4 into wloop:master Nov 20, 2017
@Mogball Mogball deleted the jeff/hotfixing branch June 19, 2018 21:26
dhillondeep pushed a commit that referenced this pull request May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants