From a096a2a34cc1e3afdab9ba9e87af4980a8d82c6e Mon Sep 17 00:00:00 2001 From: Venelin Date: Mon, 10 Jun 2024 12:21:23 +0300 Subject: [PATCH] clean up compilaton options --- build_debug.sh | 5 +---- install.sh | 9 +-------- src/parser.cpp | 9 +++++---- todo.txt | 4 ++-- 4 files changed, 9 insertions(+), 18 deletions(-) diff --git a/build_debug.sh b/build_debug.sh index 24d8970..ee9a1b0 100755 --- a/build_debug.sh +++ b/build_debug.sh @@ -3,10 +3,7 @@ language=' -std=c++17 -fno-rtti - -fno-exceptions - -fno-non-call-exceptions - -fno-common' -# force each global variable to be only defined once + -fno-exceptions' warnings=' -Wall diff --git a/install.sh b/install.sh index ed6e27a..47a4f02 100755 --- a/install.sh +++ b/install.sh @@ -8,26 +8,19 @@ PREFIX=/usr/local language=' -std=c++17 -fno-rtti - -fno-exceptions - -fno-non-call-exceptions - -fno-common' # force each global variable to be only defined once + -fno-exceptions' optimizations=' -Ofast -flto - -fipa-pta - -fgcse-sm - -fgcse-las -march=native' warnings=' -Wall -Wextra - -Wno-implicit-fallthrough -Wno-multichar' # -Wpedantic' #-fanalyzer - other='-fno-fat-lto-objects' # Compile diff --git a/src/parser.cpp b/src/parser.cpp index 2df958d..a73f1e4 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -223,7 +223,7 @@ namespace /* internal */ type = ATR_SPOUSES; break; default: - U16 cyr = ((U8)t.begin[0] << 8) | (U8)t.begin[1]; /* assuming char signed? */ + U16 cyr = ((U8)t.begin[0] << 8) | (U8)t.begin[1]; switch(cyr) /* check for cyrilic attribure */ { case 'д': @@ -238,6 +238,7 @@ namespace /* internal */ case 'с': type = ATR_SPOUSES; break; + case 'AB': default: err_illegal_attribute(t); } @@ -338,7 +339,7 @@ namespace /* internal */ } else if(it->size() == 2) { - U16 cyr = ((U8)it->begin[0] << 8) | (U8)it->begin[1]; /* assuming char signed? */ + U16 cyr = ((U8)it->begin[0] << 8) | (U8)it->begin[1]; if(cyr == 'М') res = M; else if(cyr == 'Ж') @@ -543,10 +544,10 @@ namespace /* internal */ case ATR_SPOUSES: spouses = parseSpouses(it, end); break; - case NEW_LINE: + case NEW_LINE: // current person is done ++line; ++it; - case STRING: + case STRING: // next person starts here /* todo str prevent copy */ cur_tree->addPerson(name.c_str(), sex, parents.first, parents.second, birth, death); diff --git a/todo.txt b/todo.txt index 35a5cd9..8b8ba8e 100644 --- a/todo.txt +++ b/todo.txt @@ -11,7 +11,7 @@ types - screenCoord... Visualization: - zooming - snap to selection/scroll with selection -- horizontal navigation between cousins +- horizontal navigation between cousins - finish - color on different consoles - screen resize - empty tree @@ -32,7 +32,7 @@ Compilation Refactoring - comment style /* -- check return codes - setlocale +- check return codes - setlocale, test - no Adam