From 92bc473eac6ce6c343c20fa02965d47e18d84641 Mon Sep 17 00:00:00 2001 From: TheGoatGod Date: Thu, 5 Aug 2021 13:35:22 +0100 Subject: [PATCH] [Github] Fix issues on codefactor (#141) * Update Template_Markdown.md * Update Generator_toc.yml * Update Generator_toc.yml * Update Generator_toc.yml * Revert "Update Template_Markdown.md" This reverts commit 6de8f3a87dc3358c3e46ce6ecac4592012fc8637. * Update TOC (#137) * Update the table of contents * Update the table of contents * Update VS_linter.md * Update Generator_toc.yml * Update Professions_catalogue.md * Update Installation_guide.md * Update Installation_Times_for_Gun_Mods.md * Update Learning_Code.md * Update Override_a_variable.md * Update Updating_Legacy_JSON.md * Update VS_linter.md * Update Generator_toc.yml * Update Professions_catalogue.md * Update Generator_toc.yml * Update Professions_catalogue.md * Update Generator_toc.yml * Update .typo-ci.yml Co-authored-by: TheGoatGod Co-authored-by: TheGoatGod Co-authored-by: TheGoatGod <56883303+TheGoatGod@users.noreply.github.com> * Update Generator_toc.yml * Update Template_Markdown.md * Update Generator_toc.yml * Revert "Update Template_Markdown.md" This reverts commit af5b1ce909977f74039281509912fd5b7036e6e6. * Update Generator_toc.yml * rename the no starter kit * Update Generator_toc.yml * Revert "Revert "Update Template_Markdown.md"" This reverts commit 8f5851f3a61c12febf7a1a453f49bb6617195fe5. * Update Generator_toc.yml * Update TOC (#138) * Update the table of contents * Update the table of contents * Update VS_linter.md * Update Generator_toc.yml * Update Professions_catalogue.md * Update Installation_guide.md * Update Installation_Times_for_Gun_Mods.md * Update Learning_Code.md * Update Override_a_variable.md * Update Updating_Legacy_JSON.md * Update VS_linter.md * Update Generator_toc.yml * Update Professions_catalogue.md * Update Generator_toc.yml * Update Professions_catalogue.md * Update Generator_toc.yml * Update .typo-ci.yml * Update TOC * remove generated with in mds * remove generated with in mds Co-authored-by: TheGoatGod Co-authored-by: TheGoatGod Co-authored-by: TheGoatGod <56883303+TheGoatGod@users.noreply.github.com> * Update TOC (#139) * Update TOC * remove generated with from md Co-authored-by: TheGoatGod Co-authored-by: TheGoatGod Co-authored-by: TheGoatGod <56883303+TheGoatGod@users.noreply.github.com> * Update README.md * Update README.md * remove white space * Update colony.h * Update cata_utility.h * Update game.h * Update string_id.h Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: TheGoatGod --- src/cata_utility.h | 1 - src/colony.h | 21 +-------------------- src/game.h | 2 -- src/string_id.h | 1 - 4 files changed, 1 insertion(+), 24 deletions(-) diff --git a/src/cata_utility.h b/src/cata_utility.h index ef7e2b94c..e00570caa 100644 --- a/src/cata_utility.h +++ b/src/cata_utility.h @@ -24,7 +24,6 @@ struct pair_greater_cmp_first { bool operator()( const std::pair &a, const std::pair &b ) const { return a.first > b.first; } - }; /** diff --git a/src/colony.h b/src/colony.h index f33525895..5edced11e 100644 --- a/src/colony.h +++ b/src/colony.h @@ -104,7 +104,6 @@ class colony : private element_allocator_type friend class colony_reverse_iterator; private: - struct group; // forward declaration for typedefs below using aligned_element_allocator_type = typename @@ -191,7 +190,6 @@ class colony : private element_allocator_type }; public: - // Iterators: template class colony_iterator { @@ -311,7 +309,6 @@ class colony : private element_allocator_type } public: - colony_iterator &operator--() { assert( group_pointer != nullptr ); assert( !( element_pointer == group_pointer->elements && @@ -389,7 +386,6 @@ class colony : private element_allocator_type element_pointer( element_p ), skipfield_pointer( skipfield_p ) {} public: - inline colony_iterator( const colony_iterator &source ) noexcept: group_pointer( source.group_pointer ), element_pointer( source.element_pointer ), @@ -571,18 +567,15 @@ class colony : private element_allocator_type it( group_p, element_p, skipfield_p ) {} public: - // move constructors colony_reverse_iterator( colony_reverse_iterator &&source ) noexcept: it( std::move( source.it ) ) {} colony_reverse_iterator( typename colony::iterator &&source ) noexcept: it( std::move( source ) ) {} - }; // colony_reverse_iterator private: - // Used to prevent fill-insert/constructor calls being mistakenly resolved to range-insert/constructor calls template struct enable_if_c { @@ -613,7 +606,6 @@ class colony : private element_allocator_type } group_allocator_pair; public: - /** * Default constructor: * default minimum group size is 8, default maximum group size is @@ -695,7 +687,6 @@ class colony : private element_allocator_type } private: - inline void blank() noexcept { // if all pointer types are trivial, we can just nuke it from orbit with memset (NULL is always 0 in C++): if COLONY_CONSTEXPR( std::is_trivial::value && @@ -716,7 +707,6 @@ class colony : private element_allocator_type } public: - /** * Move constructor: * Move all contents from source colony, does not remove any erased element locations or @@ -873,7 +863,6 @@ class colony : private element_allocator_type } private: - void destroy_all_data() noexcept { // Amusingly enough, these changes from && to logical & actually do make a significant difference in debug mode if( ( total_number_of_elements != 0 ) & !( std::is_trivially_destructible::value ) ) { @@ -936,7 +925,6 @@ class colony : private element_allocator_type } public: - /** * Inserts the element supplied to the colony, using the object's copy-constructor. Will * insert the element into a previously erased element slot if one exists, otherwise will @@ -1392,7 +1380,6 @@ class colony : private element_allocator_type } private: - // Internal functions for fill insert: void group_create( const skipfield_type number_of_elements ) { const group_pointer_type next_group = end_iterator.group_pointer->next_group = COLONY_ALLOCATE( @@ -1515,7 +1502,6 @@ class colony : private element_allocator_type } public: - /** * Fill insert: * Inserts n copies of val into the colony. Will insert the element into a previously erased @@ -1679,7 +1665,6 @@ class colony : private element_allocator_type } private: - inline COLONY_FORCE_INLINE void update_subsequent_group_numbers( group_pointer_type current_group ) noexcept { do { @@ -1729,7 +1714,6 @@ class colony : private element_allocator_type } public: - /** * Removes the element pointed to by the supplied iterator, from the colony. Returns an * iterator pointing to the next non-erased element in the colony (or to end() if no more @@ -3209,7 +3193,6 @@ class colony : private element_allocator_type } private: - struct less { bool operator()( const element_type &a, const element_type &b ) const noexcept { return a < b; @@ -3233,7 +3216,6 @@ class colony : private element_allocator_type }; public: - /** * Sort the content of the colony. By default this compares the colony content using a * less-than operator, unless the user supplies a comparison function (ie. same conditions @@ -3485,8 +3467,7 @@ class colony : private element_allocator_type source.group_allocator_pair.max_elements_per_group = swap_max_elements_per_group; } } - -}; // colony +}; // colony /** * Swaps colony A's contents with that of colony B. diff --git a/src/game.h b/src/game.h index f55fd366d..3ac440fd7 100644 --- a/src/game.h +++ b/src/game.h @@ -904,7 +904,6 @@ class game // Draws the pixel minimap based on the player's current location void draw_pixel_minimap( const catacurses::window &w ); private: - // int autosave_timeout(); // If autosave enabled, how long we should wait for user inaction before saving. void autosave(); // automatic quicksaves - Performs some checks before calling quicksave() public: @@ -972,7 +971,6 @@ class game achievements_tracker &achievements(); memorial_logger &memorial(); public: - spell_events &spell_events_subscriber(); pimpl critter_tracker; diff --git a/src/string_id.h b/src/string_id.h index f5d2c6b17..39d402c40 100644 --- a/src/string_id.h +++ b/src/string_id.h @@ -117,7 +117,6 @@ class string_id const T &operator*() const { return obj(); - } const T *operator->() const { return &obj();