Skip to content

Commit deb3128

Browse files
committed
Small fixes
1 parent af974d1 commit deb3128

File tree

7 files changed

+23
-20
lines changed

7 files changed

+23
-20
lines changed

.github/scripts/get_code_cov.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ run_gcov ()
1414
then
1515
gcov -lp -o "./.libs/" "$FILENAME"
1616
fi
17+
18+
return 0
1719
}
1820

1921
find "./test/" \

build.sh

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ cd "$SRCDIR" || exit
1616
print_systeminfo ()
1717
{
1818
test -z "$CXX" && eval "$(grep '^CXX = ' "Makefile" | cut -d' ' -f1-3 | sed -e 's/ //g')"
19-
local CXX_VERSION="$($CXX -dumpfullversion -dumpversion || echo "unknown version")"
20-
local BUILD_MODE="$1"
19+
local cxx_version="$($CXX -dumpfullversion -dumpversion || echo "unknown version")"
20+
local build_mode="$1"
2121
echo "-------------------------"
2222
echo " Platform: $PLATFORM"
2323
echo " Architecture: $ARCH"
24-
echo " Compiler: $CXX $CXX_VERSION"
25-
echo " Build: $BUILD_MODE"
24+
echo " Compiler: $CXX $cxx_version"
25+
echo " Build: $build_mode"
2626
echo "Number of jobs: $JOBS"
2727
echo "-------------------------"
2828
return 0
@@ -34,15 +34,16 @@ then
3434
CPU_COUNT="$(getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null)" || CPU_COUNT="0"
3535
fi
3636

37-
if [ "$CPU_COUNT" -eq 0 \
38-
&& command -v nproc >/dev/null 2>&1 ]
37+
if [ "$CPU_COUNT" -eq 0 ] \
38+
&& command -v nproc >/dev/null 2>&1
3939
then
4040
CPU_COUNT="$(nproc 2>/dev/null)" || CPU_COUNT="0"
4141
fi
4242

4343
test "$CPU_COUNT" -eq 0 && CPU_COUNT=1
4444

45-
if [ -n "$1" && ! -f ./configure ]
45+
if [ -n "$1" ] \
46+
&& [ ! -f ./configure ]
4647
then
4748
if command -v autoreconf >/dev/null
4849
then

examples/rotozoomer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ using finalcut::FColor;
5050
namespace {
5151

5252
// Constants
53-
static constexpr int MAX_LOOPS{314};
53+
constexpr int MAX_LOOPS{314};
5454

5555
// Non-member functions
5656
constexpr auto generateSinTable() noexcept -> std::array<float, MAX_LOOPS>

final/output/tty/ftermoutput.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ namespace internal
4949
template <typename T>
5050
constexpr T clampValue (T value, T minVal, T maxVal)
5151
{
52-
return ( value < minVal ) ? minVal :
53-
( value > maxVal ) ? maxVal : value;
52+
if ( value < minVal )
53+
return minVal;
54+
else
55+
return ( value > maxVal ) ? maxVal : value;
5456
}
5557

5658
template <typename T>

final/vterm/fvterm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ void FVTerm::putVTerm() const
311311
auto vterm_changes = &vterm->changes_in_line[unsigned(0)];
312312
std::for_each ( vterm_changes
313313
, vterm_changes + unsigned(vterm->size.height)
314-
, [this, &xmax] (auto& vterm_changes_line) noexcept
314+
, [&xmax] (auto& vterm_changes_line) noexcept
315315
{
316316
vterm_changes_line.xmin = 0;
317317
vterm_changes_line.xmax = xmax;

final/vterm/fvterm.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ struct FVTerm::FTermArea // Define virtual terminal character properties
469469
constexpr auto isOverlapped (const FRect&) const noexcept -> bool;
470470
constexpr auto isOverlapped (const FTermArea*) const noexcept -> bool;
471471
constexpr auto isPrintPositionInsideArea() const noexcept -> bool;
472-
inline auto reprint (const FRect&, const FSize&) noexcept -> bool;
472+
auto reprint (const FRect&, const FSize&) noexcept -> bool;
473473

474474
inline auto getFChar (int x, int y) const noexcept -> const FChar&
475475
{
@@ -512,7 +512,7 @@ struct FVTerm::FTermArea // Define virtual terminal character properties
512512
return -1;
513513
}
514514

515-
inline void updateAreaChanges (uInt, uInt, uInt8) noexcept;
515+
void updateAreaChanges (uInt, uInt, uInt8) noexcept;
516516

517517
// Data members
518518
struct Coordinate

scripts/perf-call-graph.sh

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ then
1414
CPU_COUNT="$(getconf _NPROCESSORS_ONLN 2>/dev/null || getconf NPROCESSORS_ONLN 2>/dev/null)" || CPU_COUNT="0"
1515
fi
1616

17-
if [ "$CPU_COUNT" -eq 0 ]
17+
if [[ "$CPU_COUNT" -eq 0 ]] \
18+
&& command -v nproc >/dev/null 2>&1
1819
then
19-
if command -v nproc >/dev/null 2>&1
20-
then
21-
CPU_COUNT="$(nproc 2>/dev/null)" || CPU_COUNT="0"
22-
fi
20+
CPU_COUNT="$(nproc 2>/dev/null)" || CPU_COUNT="0"
2321
fi
2422

25-
test "$CPU_COUNT" -eq 0 && CPU_COUNT=1
23+
[[ "$CPU_COUNT" -eq 0 ]] && CPU_COUNT=1
2624

2725
SAVE_DIR="$PWD"
2826
cd .. || exit
@@ -33,7 +31,7 @@ cd "$SAVE_DIR"
3331

3432
echo 0 > /proc/sys/kernel/kptr_restrict
3533

36-
if [ $# -gt 0 ]
34+
if [[ $# -gt 0 ]]
3735
then
3836
LD_LIBRARY_PATH="../final/.libs/" perf record -g "$@"
3937
else

0 commit comments

Comments
 (0)