From aacf27ff74305f8f8b45f10941c32a410c3d1d7f Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Tue, 19 Nov 2019 02:46:01 +0100 Subject: [PATCH] update .travis.yml dist: xenial --- .travis.yml | 22 +++++----------------- examples/term-attributes.cpp | 12 ++++++------ 2 files changed, 11 insertions(+), 23 deletions(-) diff --git a/.travis.yml b/.travis.yml index 37cf2eca..378cf041 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,13 @@ language: cpp -dist: trusty +dist: xenial sudo: required compiler: - gcc addons: apt: - sources: - - ubuntu-toolchain-r-test packages: - - g++-7 + - g++ - autotools-dev - automake - autoconf @@ -50,13 +48,10 @@ matrix: - os: linux env: - TEST="Coverity Scan" - - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" addons: apt: - sources: - - ubuntu-toolchain-r-test packages: - - g++-7 + - g++ - gpm - libgpm-dev - libcppunit-dev @@ -66,25 +61,21 @@ matrix: name: gansm/finalcut description: Build submitted via Travis CI notification_email: guru.mail@muenster.de - build_command_prepend: "cov-configure --comptype gcc --compiler gcc-7 --template && autoreconf -v --install --force && ./configure --prefix=/usr CPPFLAGS='-DDEBUG' CXXFLAGS='-g -O0 -DDEBUG -DUNIT_TEST' --with-unit-test && make clean" + build_command_prepend: "autoreconf -v --install --force && ./configure --prefix=/usr CPPFLAGS='-DDEBUG' CXXFLAGS='-g -O0 -DDEBUG -DUNIT_TEST' --with-unit-test && make clean" build_command: "make V=1 -j10" branch_pattern: master before_install: - - eval "${MATRIX_EVAL}" - lsb_release -a - uname -a - whoami - echo -n | openssl s_client -CApath /etc/ssl/certs/ -connect scan.coverity.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' | sudo tee -a /etc/ssl/certs/ca-certificates.crt script: + - cat /home/travis/build/gansm/finalcut/cov-int/scm_log.txt - autoreconf -v --install --force - ./configure --prefix=/usr CPPFLAGS="-DDEBUG" CXXFLAGS="-g -O0 -DDEBUG -DUNIT_TEST" --with-unit-test - make V=1 -j10 - make check - cat test/*.log - after_script: - - echo "--------------- scm_log.txt ---------------" - - cat /home/travis/build/gansm/finalcut/cov-int/scm_log.txt - - echo "-------------------------------------------" # # Coveralls + Codecov @@ -92,9 +83,7 @@ matrix: - os: linux env: - TEST="Coveralls" - - MATRIX_EVAL="CC=gcc-7 && CXX=g++-7" before_install: - - eval "${MATRIX_EVAL}" - lsb_release -a - uname -a - pip install --user cpp-coveralls @@ -119,4 +108,3 @@ matrix: - autoreconf -v --install --force - ./configure --prefix=/usr - make -j10 - diff --git a/examples/term-attributes.cpp b/examples/term-attributes.cpp index 62c6c550..ebb2885b 100644 --- a/examples/term-attributes.cpp +++ b/examples/term-attributes.cpp @@ -232,18 +232,18 @@ class AttribDemo : public finalcut::FWidget void draw() override; // Data member - int colors; + FColor last_color; }; //---------------------------------------------------------------------- AttribDemo::AttribDemo (finalcut::FWidget* parent) : finalcut::FWidget(parent) - , colors(getMaxColor()) + , last_color(FColor(getMaxColor())) { if ( isMonochron() ) - colors = 1; - else if ( colors > 16 ) - colors = 16; + last_color = 1; + else if ( last_color > 16 ) + last_color = 16; unsetFocusable(); } @@ -253,7 +253,7 @@ void AttribDemo::printColorLine() { auto parent = static_cast(getParent()); - for (FColor color{0}; color < FColor(colors); color++) + for (FColor color{0}; color < last_color; color++) { print() << FColorPair(color, parent->bgcolor) << " # "; }