update release compilation, add warnings
This commit is contained in:
+29
-1
@@ -1 +1,29 @@
|
||||
g++ -o bin/release/famt -std=gnu++20 -Ofast -flto -fipa-pta -fallow-store-data-races -fgcse-sm -fgcse-las -s -DNDEBUG *.cpp -lncursesw
|
||||
#!/bin/dash
|
||||
|
||||
language='
|
||||
-std=gnu++20
|
||||
-fno-rtti
|
||||
-fno-exceptions
|
||||
-fno-non-call-exceptions'
|
||||
|
||||
optimizations='
|
||||
-Ofast
|
||||
-flto
|
||||
-fipa-pta
|
||||
-fallow-store-data-races
|
||||
-fgcse-sm
|
||||
-fgcse-las'
|
||||
|
||||
warnings='
|
||||
-Wall
|
||||
-Wextra
|
||||
-Wpedantic
|
||||
-Wmultiple-inheritance
|
||||
-Wvirtual-inheritance' #-fanalyzer
|
||||
|
||||
|
||||
# each global variable is only declared once per single object.
|
||||
other='-fno-common -fno-fat-lto-objects'
|
||||
|
||||
g++ -o bin/release/famt $language $optimizations $warnings $other -DNDEBUG -s *.cpp -lncursesw
|
||||
#-static -lncursesw -ltinfo
|
||||
|
||||
@@ -94,48 +94,48 @@ int main()
|
||||
|
||||
/* ====================================================== */
|
||||
|
||||
std::vector<Tree> trees;
|
||||
/* std::vector<Tree> trees; */
|
||||
|
||||
bool quit = false;
|
||||
char input[128];
|
||||
short i; //Number of the entered command
|
||||
const short numCom = 24;
|
||||
const char* const commandList[] =
|
||||
{
|
||||
"quit", //0
|
||||
"rename", //1
|
||||
"load", //2
|
||||
"save", //3
|
||||
"addPerson", //4
|
||||
"addPersonWP", //5 Adds a person and connects him to his parents, by their number
|
||||
"addRelation", //6 Adds a relation between two people input by name
|
||||
"addRelationID", //7 -||- by number
|
||||
"findID", //8
|
||||
"equate", //9 Enter the number of two trees, the second becomes equal to the first
|
||||
"combine", //10
|
||||
"subtract", //11
|
||||
"removePerson", //12
|
||||
"removePersonID", //13
|
||||
"removeRelation", //14
|
||||
"removeRelationID", //15
|
||||
"addTree", //16
|
||||
"prtRelatives", //17
|
||||
"prtMember", //18
|
||||
"prtAncestors", //19
|
||||
"chooseTree", //20
|
||||
"prtCommonAncestor", //21
|
||||
"prtOldestAncestors",//22
|
||||
"prtTree" //23
|
||||
};
|
||||
/* bool quit = false; */
|
||||
/* char input[128]; */
|
||||
/* short i; //Number of the entered command */
|
||||
/* const short numCom = 24; */
|
||||
/* const char* const commandList[] = */
|
||||
/* { */
|
||||
/* "quit", //0 */
|
||||
/* "rename", //1 */
|
||||
/* "load", //2 */
|
||||
/* "save", //3 */
|
||||
/* "addPerson", //4 */
|
||||
/* "addPersonWP", //5 Adds a person and connects him to his parents, by their number */
|
||||
/* "addRelation", //6 Adds a relation between two people input by name */
|
||||
/* "addRelationID", //7 -||- by number */
|
||||
/* "findID", //8 */
|
||||
/* "equate", //9 Enter the number of two trees, the second becomes equal to the first */
|
||||
/* "combine", //10 */
|
||||
/* "subtract", //11 */
|
||||
/* "removePerson", //12 */
|
||||
/* "removePersonID", //13 */
|
||||
/* "removeRelation", //14 */
|
||||
/* "removeRelationID", //15 */
|
||||
/* "addTree", //16 */
|
||||
/* "prtRelatives", //17 */
|
||||
/* "prtMember", //18 */
|
||||
/* "prtAncestors", //19 */
|
||||
/* "chooseTree", //20 */
|
||||
/* "prtCommonAncestor", //21 */
|
||||
/* "prtOldestAncestors",//22 */
|
||||
/* "prtTree" //23 */
|
||||
/* }; */
|
||||
|
||||
unsigned curTree = 0, //Currently selected tree ID
|
||||
id, secondId; // Person IDs
|
||||
Tree* newTree;
|
||||
char name[128], secondName[128];
|
||||
U8 day, month; //TODO add h m
|
||||
U16 year;
|
||||
bool sex;
|
||||
unsigned father, mother; // IDs
|
||||
/* unsigned curTree = 0, //Currently selected tree ID */
|
||||
/* id, secondId; // Person IDs */
|
||||
/* Tree* newTree; */
|
||||
/* char name[128], secondName[128]; */
|
||||
/* U8 day, month; //TODO add h m */
|
||||
/* U16 year; */
|
||||
/* bool sex; */
|
||||
/* unsigned father, mother; // IDs */
|
||||
|
||||
/* do */
|
||||
/* { */
|
||||
|
||||
Reference in New Issue
Block a user