From c29f50da0dabc7a5aafe1b5f9185c347e486d7d8 Mon Sep 17 00:00:00 2001 From: sigonasr2 Date: Wed, 15 Nov 2023 07:53:55 -0600 Subject: [PATCH] Replace sealed keyword with final (C++11 standard) Co-authored-by: sigonasr2 --- Crawler/MenuItemButton.h | 6 +++--- Crawler/loc.sh | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/Crawler/MenuItemButton.h b/Crawler/MenuItemButton.h index 57e28643..1e0044e1 100644 --- a/Crawler/MenuItemButton.h +++ b/Crawler/MenuItemButton.h @@ -109,7 +109,7 @@ protected: } } } - inline MenuComponent*PickUpDraggableItem()override sealed{ + inline MenuComponent*PickUpDraggableItem()override final{ if(valid){ MenuItemButton*pickUp=NEW MenuItemButton(parentMenu,rect,invRef,inventoryIndex,onClick); valid=false; @@ -119,10 +119,10 @@ protected: } } - inline bool DropDraggableItem(MenuComponent*draggable)override sealed{ + inline bool DropDraggableItem(MenuComponent*draggable)override final{ //HACK Warning! We're making a bold assumption that every component that is draggable is of the same type! This may change in the future.... MenuItemButton*draggedItem=(MenuItemButton*)draggable; ITCategory cat=ITEM_DATA.at(draggedItem->invRef.at(draggedItem->inventoryIndex)).Category(); return Inventory::SwapItems(cat,draggedItem->inventoryIndex,inventoryIndex); } -}; \ No newline at end of file +}; diff --git a/Crawler/loc.sh b/Crawler/loc.sh index 8aa3b52a..819792da 100755 --- a/Crawler/loc.sh +++ b/Crawler/loc.sh @@ -1 +1,3 @@ -wc -l $(find *.cpp *.h -not -name "olc*.h") \ No newline at end of file +TOTAL=$(wc -l $(find *.cpp *.h -not -name "olc*.h")|grep "total"|awk '{print $1}') +FILECOUNT=$(find *.cpp *.h -not -name "olc*.h"|wc -l) +echo "$[TOTAL-FILECOUNT*31] (License lines Excluded)"