diff --git a/.github/scripts/tidy-vs-commit.sh b/.github/scripts/tidy-vs-commit.sh new file mode 100755 index 00000000000..ae8328a74ae --- /dev/null +++ b/.github/scripts/tidy-vs-commit.sh @@ -0,0 +1,39 @@ +#!/usr/bin/env bash +# Runs clang-tidy only on changed files + +readonly BASE=$1 +readonly BUILD_DIR=build + +MODIFIED_FILES=$(git diff-tree --no-commit-id --diff-filter=d --name-only -r "$BASE" HEAD | grep '\.c') +MODIFIED_HEADERS=$(git diff-tree --no-commit-id --diff-filter=d --name-only -r "$BASE" HEAD | grep '\.h') +POSTGRES_SERVER=$(grep -o -m1 '\-isystem .*' "${BUILD_DIR}/compile_commands.json" | head -1 | awk '{print $2}') + +echo "POSTGRES_SERVER ${POSTGRES_SERVER}" + +CHECKS="-checks=clang-analyzer-*" + +if [ -z "${MODIFIED_FILES}" ] && [ -z "${MODIFIED_HEADERS}" ]; then + echo "No paths modified" + exit 0 +fi + +# C/C++ use the compile command +if [ ${#MODIFIED_FILES[@]} != 0 ] ; then + for f in ${MODIFIED_FILES} + do + if [ "${f##*.}" == 'conf' ]; then continue; fi + echo "${f}" + clang-tidy -p "${BUILD_DIR}" "${CHECKS}" -header-filter="^$(pwd).*" "${f}" + done +fi + +# H/HPP do not have a compile command +# workaround: add the includes +if [ ${#MODIFIED_HEADERS[@]} != 0 ] ; then + for f in ${MODIFIED_HEADERS} + do + echo "${f}" + clang-tidy "${CHECKS}" -header-filter=.* "${f}" \ + -- -I./include -isystem "${POSTGRES_SERVER}" + done +fi diff --git a/.github/workflows/boost_version.yml b/.github/workflows/boost_version.yml index 09fe7dbd1f6..923d9e90d2f 100644 --- a/.github/workflows/boost_version.yml +++ b/.github/workflows/boost_version.yml @@ -27,6 +27,7 @@ name: Boost supported versions # - 1.56 is the minimum version we ask (Aug 2014) on: + workflow_dispatch: push: paths: - '.github/workflows/boost_version.yml' @@ -94,11 +95,6 @@ jobs: sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \ $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' - - name: Install python - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - name: Install dependencies run: | sudo apt-get update @@ -110,8 +106,6 @@ jobs: postgresql-${PGVER}-postgis-${PGIS}-scripts \ postgresql-server-dev-${PGVER} - python -m pip install --upgrade pip - pip install -r requirements.txt wget https://sourceforge.net/projects/boost/files/boost/1.${{ matrix.boost_minor }}.0/boost_1_${{ matrix.boost_minor }}_0.tar.bz2 #wget https://dl.bintray.com/boostorg/release/1.${{ matrix.boost_minor }}.0/source/boost_1_${{ matrix.boost_minor }}_0.tar.bz2 sudo tar --bzip2 -xf boost_1_${{ matrix.boost_minor }}_0.tar.bz2 @@ -123,7 +117,7 @@ jobs: export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH mkdir build cd build - cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Debug -DWITH_DOC=OFF .. + cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_BUILD_TYPE=Debug .. - name: Build run: | @@ -136,5 +130,5 @@ jobs: sudo service postgresql start psql -c "CREATE DATABASE ___pgr___test___;" DIR=$(git rev-parse --show-toplevel) - bash "${DIR}/tools/testers/setup_db.sh" "${PGPORT}" ___pgr___test___ "${PG_RUNNER_USER}" "3.6.2" + bash "${DIR}/tools/testers/setup_db.sh" "${PGPORT}" ___pgr___test___ "${PG_RUNNER_USER}" "3.6.3" pg_prove -Q -f --normalize --directives --recurse -U "${PG_RUNNER_USER}" -d ___pgr___test___ "pgtap" diff --git a/.github/workflows/check-queries.yml b/.github/workflows/check-queries.yml index 0e7adb2d27e..aa7addeaeff 100644 --- a/.github/workflows/check-queries.yml +++ b/.github/workflows/check-queries.yml @@ -12,6 +12,7 @@ name: Check queries # - the latest postgis version on: + workflow_dispatch: push: paths: - '.github/workflows/check-queries.yml' diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index bd3a3611b11..0e6a194d6dd 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -11,6 +11,7 @@ name: Build for Ubuntu with clang # - postgis 3 on: + workflow_dispatch: push: paths: - '.github/workflows/clang.yml' diff --git a/.github/workflows/tidy-check.yml b/.github/workflows/tidy-check.yml new file mode 100644 index 00000000000..58f29867c30 --- /dev/null +++ b/.github/workflows/tidy-check.yml @@ -0,0 +1,59 @@ +name: clang-tidy check + +on: + workflow_dispatch: + pull_request: + branches-ignore: + - 'gh-pages' + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + check-changelog: + name: Check for changelog entry + runs-on: ubuntu-latest + env: + PR_BASE: ${{ github.base_ref }} + + steps: + + - uses: actions/checkout@v4 + + - name: Get postgres version + run: | + sudo service postgresql start + pgver=$(psql --version | grep -Po '(?<=psql \(PostgreSQL\) )[^;]+(?=\.\d+ \()') + echo "PGVER=${pgver}" >> $GITHUB_ENV + echo "PGPORT=5432" >> $GITHUB_ENV + + - name: Add PostgreSQL APT repository + run: | + sudo apt-get install curl ca-certificates gnupg + curl https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add - + sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ \ + $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y \ + libboost-graph-dev \ + postgresql-${PGVER} \ + postgresql-server-dev-${PGVER} + + - name: Configure + run: | + export PATH=/usr/lib/postgresql/${PGVER}/bin:$PATH + mkdir build + cd build + cmake -DPOSTGRESQL_VERSION=${PGVER} -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DWITH_DOC=OFF .. + + - name: Add upstream + run: | + git remote add upstream https://github.com/pgRouting/pgrouting + git fetch upstream ${PR_BASE} + + - name: do clang-tidy + run: .github/scripts/tidy-vs-commit.sh "upstream/${PR_BASE}" diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 3df30812c4c..d18d17c0192 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -31,7 +31,10 @@ jobs: matrix: psql: [11,12,13,14,15,16] postgis: [3] - os: [ubuntu-latest, ubuntu-20.04] + os: [ubuntu-latest, ububtu-22.04, ubuntu-20.04] + exclude: + - os: ubuntu-latest + psql: 11 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index facb27ce74a..3227b31b0b2 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -28,7 +28,7 @@ jobs: strategy: fail-fast: false matrix: - old_pgr: [3.6.1, 3.6.0, 3.5.1, 3.5.0, 3.4.2, 3.4.1, 3.4.0, 3.3.5, 3.3.4, 3.3.3, 3.3.2, 3.3.1, 3.3.0, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.6, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.2.0, 3.2.1, 3.2.2] + old_pgr: [3.6.2, 3.6.1, 3.6.0, 3.5.1, 3.5.0, 3.4.2, 3.4.1, 3.4.0, 3.3.5, 3.3.4, 3.3.3, 3.3.2, 3.3.1, 3.3.0, 3.0.6, 3.1.3, 3.2.0, 3.2.1, 3.2.2] steps: - uses: actions/checkout@v4 @@ -122,6 +122,6 @@ jobs: run: | sudo service postgresql start psql -p "${PGPORT}" -d ___pgr___test___ -c "SELECT * FROM pgr_full_version();" - psql -p "${PGPORT}" -d ___pgr___test___ -c "ALTER EXTENSION pgrouting UPDATE TO '3.6.2';" + psql -p "${PGPORT}" -d ___pgr___test___ -c "ALTER EXTENSION pgrouting UPDATE TO '3.6.3';" psql -p "${PGPORT}" -d ___pgr___test___ -c "SELECT * FROM pgr_full_version();" pg_prove -Q -f --normalize --directives --recurse -U "${PG_RUNNER_USER}" -d ___pgr___test___ "pgtap" diff --git a/CMakeLists.txt b/CMakeLists.txt index 47b2f3d2122..5ffcd8016a2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ include(pgr/BuildType) #--------------------------------------------- #--------------------------------------------- -project(PGROUTING VERSION 3.6.2 +project(PGROUTING VERSION 3.6.3 LANGUAGES C CXX ) set(PROJECT_VERSION_DEV "") string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER) @@ -33,6 +33,7 @@ string(TIMESTAMP COMPILATION_DATE "%Y/%m/%d" UTC) set(MINORS 3.6 3.5 3.4 3.3 3.2 3.1 3.0 2.6) set(OLD_SIGNATURES + 3.6.2 3.6.1 3.6.0 3.5.1 @@ -60,9 +61,9 @@ include(pgr/Configure) #--------------------------------------------- set(DOXYGEN_MINIMUM_VERSION "1.7") set(SPHINX_MINIMUM_VERSION "4.0") -set(POSTGRESQL_MINIMUM_VERSION "9.2.0") +set(POSTGRESQL_MINIMUM_VERSION "11.0.0") set(BOOST_MINIMUM_VERSION "1.56.0") -set(POSTGIS_MINIMUM_VERSION "2.0.0") +set(POSTGIS_MINIMUM_VERSION "3.0.0") message(STATUS "DOXYGEN_MINIMUM_VERSION=${DOXYGEN_MINIMUM_VERSION}") message(STATUS "SPHINX_MINIMUM_VERSION=${SPHINX_MINIMUM_VERSION}") @@ -171,25 +172,24 @@ endif() # PostgreSQL #--------------------------------------------- #--------------------------------------------- -find_package(PostgreSQL) -if(NOT POSTGRESQL_FOUND OR NOT POSTGRESQL_VERSION_STRING) - message(FATAL_ERROR "PostgreSQL not found - Please check your PostgreSQL installation.") -endif() +find_package(PostgreSQL "${POSTGRESQL_MINIMUM_VERSION}") +# removing type of release on postgres version # for XbetaY XalphaY XrcY -> X.Y string(REGEX REPLACE "([0-9]+)[beta|alpha|rc|devel].*" "\\1.0" POSTGRESQL_VERSION_STRING ${POSTGRESQL_VERSION_STRING}) message(STATUS "POSTGRESQL_VERSION_STRING=${POSTGRESQL_VERSION_STRING}") +# calcualte mayor.micro STRING(REGEX MATCH "([0-9]+)\.([0-9]+)" POSTGRESQL_VERSION "${POSTGRESQL_VERSION_STRING}") message(STATUS "POSTGRESQL_VERSION=${POSTGRESQL_VERSION}") -#for X.Y.Z -> XY Y<10 -string(REGEX REPLACE "^([0-9]+)\\.([0-9]+).*" "\\1\\2" PGSQL_VERSION ${POSTGRESQL_VERSION}) -#message(STATUS "PGSQL_VERSION=${PGSQL_VERSION}") +# split mayor minor +string(REPLACE "." ";" VERSION_LIST ${POSTGRESQL_VERSION}) +list(GET VERSION_LIST 0 POSTGRESQL_VERSION_MAYOR) +list(GET VERSION_LIST 1 POSTGRESQL_VERSION_MINOR) -if("${POSTGRESQL_VERSION}" VERSION_LESS "${POSTGRESQL_MINIMUM_VERSION}") - message(FATAL_ERROR " PostgreSQL ${POSTGRESQL_MINIMUM_VERSION} or greater is required.") -endif("${POSTGRESQL_VERSION}" VERSION_LESS "${POSTGRESQL_MINIMUM_VERSION}") +math(EXPR PGSQL_VERSION "${POSTGRESQL_VERSION_MAYOR} * 1000 + ${POSTGRESQL_VERSION_MINOR}") +message(STATUS "PGSQL_VERSION=${PGSQL_VERSION}") #------- include_directories(SYSTEM ${POSTGRESQL_INCLUDE_DIR}) diff --git a/NEWS.md b/NEWS.md index ed02453619f..9da73073897 100644 --- a/NEWS.md +++ b/NEWS.md @@ -6,6 +6,43 @@ .. current + +### pgRouting 3.6.3 Release Notes + +To see all issues & pull requests closed by this release see the [Git closed +milestone for 3.6.3 +](https://github.com/pgRouting/pgrouting/issues?utf8=%E2%9C%93&q=milestone%3A%22Release%203.6.3%22) + +**Build** + +* Explicit minimum requirements: + + * postgres 11.0.0 + * postgis 3.0.0 + +**Code fixes** + +* Fix warnings from cpplint. +* Fix warnings from clang 18. + +**CI tests** + +* Add a clang tidy test on changed files. +* Update test not done on versions: 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.1.0, 3.1.1, + 3.1.2 + +**Documentation** + +* Results of documentation queries adujsted to boost 1.83.0 version: + + * pgr_edgeDisjointPaths + * pgr_stoerWagner + +**pgtap tests** + +* bug fixes + + ### pgRouting 3.6.2 Release Notes To see all issues & pull requests closed by this release see the [Git closed diff --git a/doc/src/release_notes.rst b/doc/src/release_notes.rst index 53858751b9d..7167bbb6f59 100644 --- a/doc/src/release_notes.rst +++ b/doc/src/release_notes.rst @@ -36,6 +36,44 @@ pgRouting 3.6 .. current + +pgRouting 3.6.3 Release Notes +------------------------------------------------------------------------------- + +To see all issues & pull requests closed by this release see the `Git closed +milestone for 3.6.3 +`__ + +.. rubric:: Build + +* Explicit minimum requirements: + + * postgres 11.0.0 + * postgis 3.0.0 + +.. rubric:: Code fixes + +* Fix warnings from cpplint. +* Fix warnings from clang 18. + +.. rubric:: CI tests + +* Add a clang tidy test on changed files. +* Update test not done on versions: 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.1.0, 3.1.1, + 3.1.2 + +.. rubric:: Documentation + +* Results of documentation queries adujsted to boost 1.83.0 version: + + * pgr_edgeDisjointPaths + * pgr_stoerWagner + +.. rubric:: pgtap tests + +* bug fixes + + pgRouting 3.6.2 Release Notes ------------------------------------------------------------------------------- diff --git a/docqueries/max_flow/doc-pgr_edgeDisjointPaths.result b/docqueries/max_flow/doc-pgr_edgeDisjointPaths.result index 7fbb762a495..520a08a30a2 100644 --- a/docqueries/max_flow/doc-pgr_edgeDisjointPaths.result +++ b/docqueries/max_flow/doc-pgr_edgeDisjointPaths.result @@ -9,12 +9,12 @@ SELECT * FROM pgr_edgeDisjointPaths( 11, 12); seq | path_id | path_seq | node | edge | cost | agg_cost -----+---------+----------+------+------+------+---------- - 1 | 1 | 1 | 11 | 8 | 1 | 0 - 2 | 1 | 2 | 7 | 10 | 1 | 1 - 3 | 1 | 3 | 8 | 12 | 1 | 2 - 4 | 1 | 4 | 12 | -1 | 0 | 3 - 5 | 2 | 1 | 11 | 11 | 1 | 0 - 6 | 2 | 2 | 12 | -1 | 0 | 1 + 1 | 1 | 1 | 11 | 8 | 1 | 1 + 2 | 1 | 2 | 7 | 10 | 1 | 2 + 3 | 1 | 3 | 8 | 12 | 1 | 3 + 4 | 1 | 4 | 12 | -1 | 0 | 4 + 5 | 2 | 1 | 11 | 11 | 1 | 4 + 6 | 2 | 2 | 12 | -1 | 0 | 5 (6 rows) /* -- q2 */ @@ -24,20 +24,20 @@ SELECT * FROM pgr_edgeDisjointPaths( 11, ARRAY[5, 10, 12]); seq | path_id | path_seq | end_vid | node | edge | cost | agg_cost -----+---------+----------+---------+------+------+------+---------- - 1 | 1 | 1 | 5 | 11 | 8 | 1 | 0 - 2 | 1 | 2 | 5 | 7 | 4 | 1 | 1 - 3 | 1 | 3 | 5 | 6 | 1 | 1 | 2 - 4 | 1 | 4 | 5 | 5 | -1 | 0 | 3 - 5 | 2 | 1 | 10 | 11 | 9 | 1 | 0 - 6 | 2 | 2 | 10 | 16 | 16 | 1 | 1 - 7 | 2 | 3 | 10 | 15 | 3 | 1 | 2 - 8 | 2 | 4 | 10 | 10 | -1 | 0 | 3 - 9 | 3 | 1 | 12 | 11 | 8 | 1 | 0 - 10 | 3 | 2 | 12 | 7 | 10 | 1 | 1 - 11 | 3 | 3 | 12 | 8 | 12 | 1 | 2 - 12 | 3 | 4 | 12 | 12 | -1 | 0 | 3 - 13 | 4 | 1 | 12 | 11 | 11 | 1 | 0 - 14 | 4 | 2 | 12 | 12 | -1 | 0 | 1 + 1 | 1 | 1 | 5 | 11 | 8 | 1 | 1 + 2 | 1 | 2 | 5 | 7 | 4 | 1 | 2 + 3 | 1 | 3 | 5 | 6 | 1 | 1 | 3 + 4 | 1 | 4 | 5 | 5 | -1 | 0 | 4 + 5 | 2 | 1 | 10 | 11 | 9 | 1 | 4 + 6 | 2 | 2 | 10 | 16 | 16 | 1 | 5 + 7 | 2 | 3 | 10 | 15 | 3 | 1 | 6 + 8 | 2 | 4 | 10 | 10 | -1 | 0 | 7 + 9 | 3 | 1 | 12 | 11 | 8 | 1 | 7 + 10 | 3 | 2 | 12 | 7 | 10 | 1 | 8 + 11 | 3 | 3 | 12 | 8 | 12 | 1 | 9 + 12 | 3 | 4 | 12 | 12 | -1 | 0 | 10 + 13 | 4 | 1 | 12 | 11 | 11 | 1 | 10 + 14 | 4 | 2 | 12 | 12 | -1 | 0 | 11 (14 rows) /* -- q3 */ @@ -47,20 +47,20 @@ SELECT * FROM pgr_edgeDisjointPaths( ARRAY[11, 3, 17], 12); seq | path_id | path_seq | start_vid | node | edge | cost | agg_cost -----+---------+----------+-----------+------+------+------+---------- - 1 | 1 | 1 | 3 | 3 | 7 | 1 | 0 - 2 | 1 | 2 | 3 | 7 | 8 | 1 | 1 - 3 | 1 | 3 | 3 | 11 | 11 | 1 | 2 - 4 | 1 | 4 | 3 | 12 | -1 | 0 | 3 - 5 | 2 | 1 | 11 | 11 | 8 | 1 | 0 - 6 | 2 | 2 | 11 | 7 | 10 | 1 | 1 - 7 | 2 | 3 | 11 | 8 | 12 | 1 | 2 - 8 | 2 | 4 | 11 | 12 | -1 | 0 | 3 - 9 | 3 | 1 | 11 | 11 | 11 | 1 | 0 - 10 | 3 | 2 | 11 | 12 | -1 | 0 | 1 - 11 | 4 | 1 | 17 | 17 | 15 | 1 | 0 - 12 | 4 | 2 | 17 | 16 | 9 | 1 | 1 - 13 | 4 | 3 | 17 | 11 | 11 | 1 | 2 - 14 | 4 | 4 | 17 | 12 | -1 | 0 | 3 + 1 | 1 | 1 | 3 | 3 | 7 | 1 | 1 + 2 | 1 | 2 | 3 | 7 | 8 | 1 | 2 + 3 | 1 | 3 | 3 | 11 | 11 | 1 | 3 + 4 | 1 | 4 | 3 | 12 | -1 | 0 | 4 + 5 | 2 | 1 | 11 | 11 | 8 | 1 | 4 + 6 | 2 | 2 | 11 | 7 | 10 | 1 | 5 + 7 | 2 | 3 | 11 | 8 | 12 | 1 | 6 + 8 | 2 | 4 | 11 | 12 | -1 | 0 | 7 + 9 | 3 | 1 | 11 | 11 | 11 | 1 | 7 + 10 | 3 | 2 | 11 | 12 | -1 | 0 | 8 + 11 | 4 | 1 | 17 | 17 | 15 | 1 | 8 + 12 | 4 | 2 | 17 | 16 | 9 | 1 | 9 + 13 | 4 | 3 | 17 | 11 | 11 | 1 | 10 + 14 | 4 | 4 | 17 | 12 | -1 | 0 | 11 (14 rows) /* -- q4 */ @@ -70,48 +70,48 @@ SELECT * FROM pgr_edgeDisjointPaths( ARRAY[11, 3, 17], ARRAY[5, 10, 12]); seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost -----+---------+----------+-----------+---------+------+------+------+---------- - 1 | 1 | 1 | 3 | 5 | 3 | 7 | 1 | 0 - 2 | 1 | 2 | 3 | 5 | 7 | 4 | 1 | 1 - 3 | 1 | 3 | 3 | 5 | 6 | 1 | 1 | 2 - 4 | 1 | 4 | 3 | 5 | 5 | -1 | 0 | 3 - 5 | 2 | 1 | 3 | 10 | 3 | 7 | 1 | 0 - 6 | 2 | 2 | 3 | 10 | 7 | 8 | 1 | 1 - 7 | 2 | 3 | 3 | 10 | 11 | 9 | 1 | 2 - 8 | 2 | 4 | 3 | 10 | 16 | 16 | 1 | 3 - 9 | 2 | 5 | 3 | 10 | 15 | 3 | 1 | 4 - 10 | 2 | 6 | 3 | 10 | 10 | -1 | 0 | 5 - 11 | 3 | 1 | 3 | 12 | 3 | 7 | 1 | 0 - 12 | 3 | 2 | 3 | 12 | 7 | 8 | 1 | 1 - 13 | 3 | 3 | 3 | 12 | 11 | 11 | 1 | 2 - 14 | 3 | 4 | 3 | 12 | 12 | -1 | 0 | 3 - 15 | 4 | 1 | 11 | 5 | 11 | 8 | 1 | 0 - 16 | 4 | 2 | 11 | 5 | 7 | 4 | 1 | 1 - 17 | 4 | 3 | 11 | 5 | 6 | 1 | 1 | 2 - 18 | 4 | 4 | 11 | 5 | 5 | -1 | 0 | 3 - 19 | 5 | 1 | 11 | 10 | 11 | 9 | 1 | 0 - 20 | 5 | 2 | 11 | 10 | 16 | 16 | 1 | 1 - 21 | 5 | 3 | 11 | 10 | 15 | 3 | 1 | 2 - 22 | 5 | 4 | 11 | 10 | 10 | -1 | 0 | 3 - 23 | 6 | 1 | 11 | 12 | 11 | 8 | 1 | 0 - 24 | 6 | 2 | 11 | 12 | 7 | 10 | 1 | 1 - 25 | 6 | 3 | 11 | 12 | 8 | 12 | 1 | 2 - 26 | 6 | 4 | 11 | 12 | 12 | -1 | 0 | 3 - 27 | 7 | 1 | 11 | 12 | 11 | 11 | 1 | 0 - 28 | 7 | 2 | 11 | 12 | 12 | -1 | 0 | 1 - 29 | 8 | 1 | 17 | 5 | 17 | 15 | 1 | 0 - 30 | 8 | 2 | 17 | 5 | 16 | 16 | 1 | 1 - 31 | 8 | 3 | 17 | 5 | 15 | 3 | 1 | 2 - 32 | 8 | 4 | 17 | 5 | 10 | 2 | 1 | 3 - 33 | 8 | 5 | 17 | 5 | 6 | 1 | 1 | 4 - 34 | 8 | 6 | 17 | 5 | 5 | -1 | 0 | 5 - 35 | 9 | 1 | 17 | 10 | 17 | 15 | 1 | 0 - 36 | 9 | 2 | 17 | 10 | 16 | 16 | 1 | 1 - 37 | 9 | 3 | 17 | 10 | 15 | 3 | 1 | 2 - 38 | 9 | 4 | 17 | 10 | 10 | -1 | 0 | 3 - 39 | 10 | 1 | 17 | 12 | 17 | 15 | 1 | 0 - 40 | 10 | 2 | 17 | 12 | 16 | 9 | 1 | 1 - 41 | 10 | 3 | 17 | 12 | 11 | 11 | 1 | 2 - 42 | 10 | 4 | 17 | 12 | 12 | -1 | 0 | 3 + 1 | 1 | 1 | 3 | 5 | 3 | 7 | 1 | 1 + 2 | 1 | 2 | 3 | 5 | 7 | 4 | 1 | 2 + 3 | 1 | 3 | 3 | 5 | 6 | 1 | 1 | 3 + 4 | 1 | 4 | 3 | 5 | 5 | -1 | 0 | 4 + 5 | 2 | 1 | 3 | 10 | 3 | 7 | 1 | 4 + 6 | 2 | 2 | 3 | 10 | 7 | 8 | 1 | 5 + 7 | 2 | 3 | 3 | 10 | 11 | 9 | 1 | 6 + 8 | 2 | 4 | 3 | 10 | 16 | 16 | 1 | 7 + 9 | 2 | 5 | 3 | 10 | 15 | 3 | 1 | 8 + 10 | 2 | 6 | 3 | 10 | 10 | -1 | 0 | 9 + 11 | 3 | 1 | 3 | 12 | 3 | 7 | 1 | 9 + 12 | 3 | 2 | 3 | 12 | 7 | 8 | 1 | 10 + 13 | 3 | 3 | 3 | 12 | 11 | 11 | 1 | 11 + 14 | 3 | 4 | 3 | 12 | 12 | -1 | 0 | 12 + 15 | 4 | 1 | 11 | 5 | 11 | 8 | 1 | 12 + 16 | 4 | 2 | 11 | 5 | 7 | 4 | 1 | 13 + 17 | 4 | 3 | 11 | 5 | 6 | 1 | 1 | 14 + 18 | 4 | 4 | 11 | 5 | 5 | -1 | 0 | 15 + 19 | 5 | 1 | 11 | 10 | 11 | 9 | 1 | 15 + 20 | 5 | 2 | 11 | 10 | 16 | 16 | 1 | 16 + 21 | 5 | 3 | 11 | 10 | 15 | 3 | 1 | 17 + 22 | 5 | 4 | 11 | 10 | 10 | -1 | 0 | 18 + 23 | 6 | 1 | 11 | 12 | 11 | 8 | 1 | 18 + 24 | 6 | 2 | 11 | 12 | 7 | 10 | 1 | 19 + 25 | 6 | 3 | 11 | 12 | 8 | 12 | 1 | 20 + 26 | 6 | 4 | 11 | 12 | 12 | -1 | 0 | 21 + 27 | 7 | 1 | 11 | 12 | 11 | 11 | 1 | 21 + 28 | 7 | 2 | 11 | 12 | 12 | -1 | 0 | 22 + 29 | 8 | 1 | 17 | 5 | 17 | 15 | 1 | 22 + 30 | 8 | 2 | 17 | 5 | 16 | 16 | 1 | 23 + 31 | 8 | 3 | 17 | 5 | 15 | 3 | 1 | 24 + 32 | 8 | 4 | 17 | 5 | 10 | 2 | 1 | 25 + 33 | 8 | 5 | 17 | 5 | 6 | 1 | 1 | 26 + 34 | 8 | 6 | 17 | 5 | 5 | -1 | 0 | 27 + 35 | 9 | 1 | 17 | 10 | 17 | 15 | 1 | 27 + 36 | 9 | 2 | 17 | 10 | 16 | 16 | 1 | 28 + 37 | 9 | 3 | 17 | 10 | 15 | 3 | 1 | 29 + 38 | 9 | 4 | 17 | 10 | 10 | -1 | 0 | 30 + 39 | 10 | 1 | 17 | 12 | 17 | 15 | 1 | 30 + 40 | 10 | 2 | 17 | 12 | 16 | 9 | 1 | 31 + 41 | 10 | 3 | 17 | 12 | 11 | 11 | 1 | 32 + 42 | 10 | 4 | 17 | 12 | 12 | -1 | 0 | 33 (42 rows) /* -- q5 */ @@ -132,17 +132,17 @@ SELECT * FROM pgr_edgeDisjointPaths( directed => false); seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost -----+---------+----------+-----------+---------+------+------+------+---------- - 1 | 1 | 1 | 5 | 10 | 5 | 1 | 1 | 0 - 2 | 1 | 2 | 5 | 10 | 6 | 2 | -1 | 1 - 3 | 1 | 3 | 5 | 10 | 10 | -1 | 0 | 0 - 4 | 2 | 1 | 6 | 15 | 6 | 4 | 1 | 0 - 5 | 2 | 2 | 6 | 15 | 7 | 8 | 1 | 1 - 6 | 2 | 3 | 6 | 15 | 11 | 9 | 1 | 2 - 7 | 2 | 4 | 6 | 15 | 16 | 16 | 1 | 3 - 8 | 2 | 5 | 6 | 15 | 15 | -1 | 0 | 4 - 9 | 3 | 1 | 6 | 15 | 6 | 2 | -1 | 0 - 10 | 3 | 2 | 6 | 15 | 10 | 3 | -1 | -1 - 11 | 3 | 3 | 6 | 15 | 15 | -1 | 0 | -2 + 1 | 1 | 1 | 5 | 10 | 5 | 1 | 1 | 1 + 2 | 1 | 2 | 5 | 10 | 6 | 2 | -1 | 2 + 3 | 1 | 3 | 5 | 10 | 10 | -1 | 0 | 1 + 4 | 2 | 1 | 6 | 15 | 6 | 4 | 1 | 1 + 5 | 2 | 2 | 6 | 15 | 7 | 8 | 1 | 2 + 6 | 2 | 3 | 6 | 15 | 11 | 9 | 1 | 3 + 7 | 2 | 4 | 6 | 15 | 16 | 16 | 1 | 4 + 8 | 2 | 5 | 6 | 15 | 15 | -1 | 0 | 5 + 9 | 3 | 1 | 6 | 15 | 6 | 2 | -1 | 5 + 10 | 3 | 2 | 6 | 15 | 10 | 3 | -1 | 4 + 11 | 3 | 3 | 6 | 15 | 15 | -1 | 0 | 3 (11 rows) /* -- q6 */ @@ -153,17 +153,17 @@ SELECT * FROM pgr_edgeDisjointPaths( directed => false); seq | path_id | path_seq | start_vid | end_vid | node | edge | cost | agg_cost -----+---------+----------+-----------+---------+------+------+------+---------- - 1 | 1 | 1 | 5 | 10 | 5 | 1 | 1 | 0 - 2 | 1 | 2 | 5 | 10 | 6 | 2 | -1 | 1 - 3 | 1 | 3 | 5 | 10 | 10 | -1 | 0 | 0 - 4 | 2 | 1 | 6 | 15 | 6 | 4 | 1 | 0 - 5 | 2 | 2 | 6 | 15 | 7 | 8 | 1 | 1 - 6 | 2 | 3 | 6 | 15 | 11 | 9 | 1 | 2 - 7 | 2 | 4 | 6 | 15 | 16 | 16 | 1 | 3 - 8 | 2 | 5 | 6 | 15 | 15 | -1 | 0 | 4 - 9 | 3 | 1 | 6 | 15 | 6 | 2 | -1 | 0 - 10 | 3 | 2 | 6 | 15 | 10 | 3 | -1 | -1 - 11 | 3 | 3 | 6 | 15 | 15 | -1 | 0 | -2 + 1 | 1 | 1 | 5 | 10 | 5 | 1 | 1 | 1 + 2 | 1 | 2 | 5 | 10 | 6 | 2 | -1 | 2 + 3 | 1 | 3 | 5 | 10 | 10 | -1 | 0 | 1 + 4 | 2 | 1 | 6 | 15 | 6 | 4 | 1 | 1 + 5 | 2 | 2 | 6 | 15 | 7 | 8 | 1 | 2 + 6 | 2 | 3 | 6 | 15 | 11 | 9 | 1 | 3 + 7 | 2 | 4 | 6 | 15 | 16 | 16 | 1 | 4 + 8 | 2 | 5 | 6 | 15 | 15 | -1 | 0 | 5 + 9 | 3 | 1 | 6 | 15 | 6 | 2 | -1 | 5 + 10 | 3 | 2 | 6 | 15 | 10 | 3 | -1 | 4 + 11 | 3 | 3 | 6 | 15 | 15 | -1 | 0 | 3 (11 rows) /* -- q7 */ diff --git a/docqueries/version/doc-full_version.result b/docqueries/version/doc-full_version.result index bfe074fa893..f7344703cb0 100644 --- a/docqueries/version/doc-full_version.result +++ b/docqueries/version/doc-full_version.result @@ -6,7 +6,7 @@ SET SELECT version, library FROM pgr_full_version(); version | library ---------+----------------- - 3.6.2 | pgrouting-3.6.2 + 3.6.3 | pgrouting-3.6.3 (1 row) /* -- q2 */ diff --git a/docqueries/version/doc-version.result b/docqueries/version/doc-version.result index 35f1ff62caa..7884e6eb855 100644 --- a/docqueries/version/doc-version.result +++ b/docqueries/version/doc-version.result @@ -6,7 +6,7 @@ SET SELECT pgr_version(); pgr_version ------------- - 3.6.2 + 3.6.3 (1 row) /* -- q2 */ diff --git a/include/c_common/debug_macro.h b/include/c_common/debug_macro.h index 087d6bc670d..b8f9be1d17a 100644 --- a/include/c_common/debug_macro.h +++ b/include/c_common/debug_macro.h @@ -1,5 +1,4 @@ /*PGR-GNU***************************************************************** - File: debug_macro.h Copyright (c) 2015 pgRouting developers @@ -37,7 +36,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. #define PGR_DBG(...) \ elog(DEBUG3, __VA_ARGS__) #else -#define PGR_DBG(...) do { ; } while (0) +#define PGR_DBG(...) do { ; } while (0) // NOLINT [whitespace/newline] #endif #endif // INCLUDE_C_COMMON_DEBUG_MACRO_H_ diff --git a/include/chinese/pgr_chinesePostman.hpp b/include/chinese/pgr_chinesePostman.hpp index a1a40a87e18..45827999bb2 100644 --- a/include/chinese/pgr_chinesePostman.hpp +++ b/include/chinese/pgr_chinesePostman.hpp @@ -143,7 +143,6 @@ PgrDirectedChPPGraph::PgrDirectedChPPGraph( // calcu deg & build part of edges std::map deg; - size_t i(0); for (const auto &e : originalEdges) { pgassert(e.cost > 0); /* has out going edge */ @@ -169,7 +168,6 @@ PgrDirectedChPPGraph::PgrDirectedChPPGraph( edge.capacity = (std::numeric_limits::max)(); edge.cost = e.cost; edges.push_back(edge); - ++i; } superSource = deg.rbegin()->first + 1; diff --git a/include/cpp_common/basic_vertex.h b/include/cpp_common/basic_vertex.h index 8c0ce9fb17e..2fe9ab21415 100644 --- a/include/cpp_common/basic_vertex.h +++ b/include/cpp_common/basic_vertex.h @@ -43,17 +43,17 @@ namespace pgrouting { class Basic_vertex { public: Basic_vertex() : - id(0) {} + id(0), vertex_index(0) {} Basic_vertex(const Basic_vertex &v) : - id(v.id) {} + id(v.id), vertex_index(0) {} explicit Basic_vertex(const int64_t _id) : - id(_id) {} + id(_id), vertex_index(0) {} Basic_vertex& operator=(const Basic_vertex&) = default; Basic_vertex(const Edge_t &other, bool is_source) : - id(is_source? other.source : other.target) {} + id(is_source? other.source : other.target), vertex_index(0) {} void cp_members(const Basic_vertex &other) { this->id = other.id; diff --git a/include/dijkstra/drivingDist.hpp b/include/dijkstra/drivingDist.hpp index a8e16543cc7..63894becc20 100644 --- a/include/dijkstra/drivingDist.hpp +++ b/include/dijkstra/drivingDist.hpp @@ -238,7 +238,7 @@ class Pgr_dijkstra { /* The result is empty */ Path p(start_vertex, start_vertex); - p.push_back({start_vertex, -1, 0, 0}); + p.push_back({start_vertex, -1, 0, 0, 0}); return p; } diff --git a/include/max_flow/pgr_maximumcardinalitymatching.hpp b/include/max_flow/pgr_maximumcardinalitymatching.hpp index 5118f979f8d..71daa693f24 100644 --- a/include/max_flow/pgr_maximumcardinalitymatching.hpp +++ b/include/max_flow/pgr_maximumcardinalitymatching.hpp @@ -126,9 +126,9 @@ class PgrCardinalityGraph { ++vi) { boost::tie(e, exists) = boost::edge(*vi, mate_map[*vi], boost_graph); - if (((uint64_t)mate_map[*vi] + if ((static_cast(mate_map[*vi]) != boost::graph_traits::null_vertex()) - && (*vi < (uint64_t)mate_map[*vi])) { + && (*vi < static_cast(mate_map[*vi]))) { Only_int_rt matched_couple; matched_couple.source = get_vertex_id(*vi); matched_couple.target = get_vertex_id(mate_map[*vi]); diff --git a/locale/de/LC_MESSAGES/index.po b/locale/de/LC_MESSAGES/index.po index fbbd7f76fce..75a717f1b86 100644 --- a/locale/de/LC_MESSAGES/index.po +++ b/locale/de/LC_MESSAGES/index.po @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) pgRouting Contributors - Version v3.6.2 +# Copyright (C) pgRouting Contributors - Version v3.6.3 # This file is distributed under the same license as the pgRouting package. # FIRST AUTHOR , YEAR. # diff --git a/locale/de/LC_MESSAGES/pgrouting_doc_strings.po b/locale/de/LC_MESSAGES/pgrouting_doc_strings.po index d676898a2cb..6daa68173ba 100644 --- a/locale/de/LC_MESSAGES/pgrouting_doc_strings.po +++ b/locale/de/LC_MESSAGES/pgrouting_doc_strings.po @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) pgRouting Contributors - Version v3.6.2 +# Copyright (C) pgRouting Contributors - Version v3.6.3 # This file is distributed under the same license as the pgRouting package. # Regina Obe , 2023. msgid "" diff --git a/locale/en/LC_MESSAGES/index.po b/locale/en/LC_MESSAGES/index.po index ab4d7e5aa78..f7a86f3b21e 100644 --- a/locale/en/LC_MESSAGES/index.po +++ b/locale/en/LC_MESSAGES/index.po @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) pgRouting Contributors - Version v3.6.2 +# Copyright (C) pgRouting Contributors - Version v3.6.3 # This file is distributed under the same license as the pgRouting package. # FIRST AUTHOR , 2022. # diff --git a/locale/en/LC_MESSAGES/pgrouting_doc_strings.po b/locale/en/LC_MESSAGES/pgrouting_doc_strings.po index 78d82cd09b3..3aa052d717b 100644 --- a/locale/en/LC_MESSAGES/pgrouting_doc_strings.po +++ b/locale/en/LC_MESSAGES/pgrouting_doc_strings.po @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) pgRouting Contributors - Version v3.6.2 +# Copyright (C) pgRouting Contributors - Version v3.6.3 # This file is distributed under the same license as the pgRouting package. # FIRST AUTHOR , 2022. # diff --git a/locale/es/LC_MESSAGES/index.po b/locale/es/LC_MESSAGES/index.po index 57acfd36146..14f7e1b3722 100644 --- a/locale/es/LC_MESSAGES/index.po +++ b/locale/es/LC_MESSAGES/index.po @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) pgRouting Contributors - Version v3.6.2 +# Copyright (C) pgRouting Contributors - Version v3.6.3 # This file is distributed under the same license as the pgRouting package. # FIRST AUTHOR , 2022. # diff --git a/locale/es/LC_MESSAGES/pgrouting_doc_strings.po b/locale/es/LC_MESSAGES/pgrouting_doc_strings.po index 5166400fd7b..5c12056be17 100644 --- a/locale/es/LC_MESSAGES/pgrouting_doc_strings.po +++ b/locale/es/LC_MESSAGES/pgrouting_doc_strings.po @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) pgRouting Contributors - Version v3.6.2 +# Copyright (C) pgRouting Contributors - Version v3.6.3 # This file is distributed under the same license as the pgRouting package. # FIRST AUTHOR , 2022. # Pedro Jose Rios Vergara , 2022. diff --git a/locale/ja/LC_MESSAGES/index.po b/locale/ja/LC_MESSAGES/index.po index a2ba7601008..44cf7bd2b93 100644 --- a/locale/ja/LC_MESSAGES/index.po +++ b/locale/ja/LC_MESSAGES/index.po @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) pgRouting Contributors - Version v3.6.2 +# Copyright (C) pgRouting Contributors - Version v3.6.3 # This file is distributed under the same license as the pgRouting package. # FIRST AUTHOR , 2022. # diff --git a/locale/ja/LC_MESSAGES/pgrouting_doc_strings.po b/locale/ja/LC_MESSAGES/pgrouting_doc_strings.po index 41d96dfa7ec..fd46756a900 100644 --- a/locale/ja/LC_MESSAGES/pgrouting_doc_strings.po +++ b/locale/ja/LC_MESSAGES/pgrouting_doc_strings.po @@ -1,6 +1,6 @@ # #-#-#-#-# allpairs-family.po (pgRouting v3.4.0-dev) #-#-#-#-# # SOME DESCRIPTIVE TITLE. -# Copyright (C) pgRouting Contributors - Version v3.6.2 +# Copyright (C) pgRouting Contributors - Version v3.6.3 # This file is distributed under the same license as the pgRouting package. # FIRST AUTHOR , 2022. # Translators: diff --git a/locale/ko/LC_MESSAGES/index.po b/locale/ko/LC_MESSAGES/index.po index 5e352574b3f..ab6724874fe 100644 --- a/locale/ko/LC_MESSAGES/index.po +++ b/locale/ko/LC_MESSAGES/index.po @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) pgRouting Contributors - Version v3.6.2 +# Copyright (C) pgRouting Contributors - Version v3.6.3 # This file is distributed under the same license as the pgRouting package. # FIRST AUTHOR , YEAR. # diff --git a/locale/ko/LC_MESSAGES/pgrouting_doc_strings.po b/locale/ko/LC_MESSAGES/pgrouting_doc_strings.po index efd4fe85e9f..40323bb3c4b 100644 --- a/locale/ko/LC_MESSAGES/pgrouting_doc_strings.po +++ b/locale/ko/LC_MESSAGES/pgrouting_doc_strings.po @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) pgRouting Contributors - Version v3.6.2 +# Copyright (C) pgRouting Contributors - Version v3.6.3 # This file is distributed under the same license as the pgRouting package. # Regina Obe , 2022. # Hyung-Gyu Ryoo , 2022. diff --git a/locale/pot/index.pot b/locale/pot/index.pot index 0efc33fa10c..3e98569d28e 100644 --- a/locale/pot/index.pot +++ b/locale/pot/index.pot @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) pgRouting Contributors - Version v3.6.2 +# Copyright (C) pgRouting Contributors - Version v3.6.3 # This file is distributed under the same license as the pgRouting package. # FIRST AUTHOR , YEAR. # diff --git a/locale/pot/pgrouting_doc_strings.pot b/locale/pot/pgrouting_doc_strings.pot index 24de30f7420..65c1ee0bd59 100644 --- a/locale/pot/pgrouting_doc_strings.pot +++ b/locale/pot/pgrouting_doc_strings.pot @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) pgRouting Contributors - Version v3.6.2 +# Copyright (C) pgRouting Contributors - Version v3.6.3 # This file is distributed under the same license as the pgRouting package. # FIRST AUTHOR , YEAR. # diff --git a/locale/zh_Hans/LC_MESSAGES/index.po b/locale/zh_Hans/LC_MESSAGES/index.po index 3f56c7f7d7e..c35a7d37151 100644 --- a/locale/zh_Hans/LC_MESSAGES/index.po +++ b/locale/zh_Hans/LC_MESSAGES/index.po @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) pgRouting Contributors - Version v3.6.2 +# Copyright (C) pgRouting Contributors - Version v3.6.3 # This file is distributed under the same license as the pgRouting package. # FIRST AUTHOR , YEAR. # diff --git a/locale/zh_Hans/LC_MESSAGES/pgrouting_doc_strings.po b/locale/zh_Hans/LC_MESSAGES/pgrouting_doc_strings.po index caf07c7f95e..55bbd88ed77 100644 --- a/locale/zh_Hans/LC_MESSAGES/pgrouting_doc_strings.po +++ b/locale/zh_Hans/LC_MESSAGES/pgrouting_doc_strings.po @@ -1,5 +1,5 @@ # SOME DESCRIPTIVE TITLE. -# Copyright (C) pgRouting Contributors - Version v3.6.2 +# Copyright (C) pgRouting Contributors - Version v3.6.3 # This file is distributed under the same license as the pgRouting package. # Regina Obe , 2023. # Wangdapeng , 2023. diff --git a/pgtap/mincut/stoerWagner/compare_components.pg b/pgtap/mincut/stoerWagner/compare_components.pg index c67c96c4071..69062167eab 100644 --- a/pgtap/mincut/stoerWagner/compare_components.pg +++ b/pgtap/mincut/stoerWagner/compare_components.pg @@ -98,7 +98,7 @@ SELECT CASE WHEN (SELECT boost FROM pgr_full_version()) < '1.80' THEN collect_tap(set_eq('stoerWagner7', 'VALUES (1, 1, 1, 1)', '6: Compare the mincut of subgraph with actual result')) ELSE collect_tap(set_eq('stoerWagner7', 'VALUES (1, 14, 1, 1)', '6: Compare the mincut of subgraph with actual result')) -END CASE; +END; SELECT * FROM finish(); ROLLBACK; diff --git a/src/cpp_common/combinations.cpp b/src/cpp_common/combinations.cpp index f465336ed28..efe62761f73 100644 --- a/src/cpp_common/combinations.cpp +++ b/src/cpp_common/combinations.cpp @@ -92,7 +92,9 @@ get_combinations( */ bool rule_breaker = true; for (const auto &e : r.precedences()) { - if (*ptr != e) {rule_breaker = false; break;} + if (*ptr != e) { + rule_breaker = false; break; + } ++ptr; } if (rule_breaker) { diff --git a/src/cpp_common/get_check_data.cpp b/src/cpp_common/get_check_data.cpp index 6d593496cb7..a4fec03cd3e 100644 --- a/src/cpp_common/get_check_data.cpp +++ b/src/cpp_common/get_check_data.cpp @@ -385,10 +385,10 @@ int64_t getBigInt( throw std::string("Unexpected Null value in column ") + info.name; switch (info.type) { case INT2OID: - value = (int64_t) DatumGetInt16(binval); + value = static_cast(DatumGetInt16(binval)); break; case INT4OID: - value = (int64_t) DatumGetInt32(binval); + value = static_cast(DatumGetInt32(binval)); break; case INT8OID: value = DatumGetInt64(binval); diff --git a/src/driving_distance/many_to_dist_driving_distance.c b/src/driving_distance/many_to_dist_driving_distance.c index 1b4e33beda1..03e7300436a 100644 --- a/src/driving_distance/many_to_dist_driving_distance.c +++ b/src/driving_distance/many_to_dist_driving_distance.c @@ -163,7 +163,7 @@ _pgr_drivingdistancev4(PG_FUNCTION_ARGS) { for (i = 0; i < numb; ++i) { nulls[i] = false; } - values[0] = Int32GetDatum(funcctx->call_cntr + 1); + values[0] = Int32GetDatum((int32_t)funcctx->call_cntr + 1); values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].depth); values[2] = Int64GetDatum(result_tuples[funcctx->call_cntr].from_v); values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].pred); diff --git a/src/driving_distance/many_to_dist_withPointsDD.c b/src/driving_distance/many_to_dist_withPointsDD.c index 66c71405f29..6c97f3c1545 100644 --- a/src/driving_distance/many_to_dist_withPointsDD.c +++ b/src/driving_distance/many_to_dist_withPointsDD.c @@ -221,7 +221,7 @@ _pgr_withpointsddv4(PG_FUNCTION_ARGS) { nulls[i] = false; } - values[0] = Int64GetDatum(funcctx->call_cntr + 1); + values[0] = Int64GetDatum((int64_t)funcctx->call_cntr + 1); values[1] = Int64GetDatum(result_tuples[funcctx->call_cntr].depth); values[2] = Int64GetDatum(result_tuples[funcctx->call_cntr].from_v); values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].pred); diff --git a/src/ksp/ksp.c b/src/ksp/ksp.c index 059099f6b66..113ddc5aaaf 100644 --- a/src/ksp/ksp.c +++ b/src/ksp/ksp.c @@ -253,8 +253,8 @@ _pgr_ksp(PG_FUNCTION_ARGS) { } } - values[0] = Int32GetDatum(funcctx->call_cntr + 1); - values[1] = Int32GetDatum(path_id); + values[0] = Int32GetDatum((int32_t)funcctx->call_cntr + 1); + values[1] = Int32GetDatum((int32_t)path_id); values[2] = Int32GetDatum(path[funcctx->call_cntr].seq); if (PG_NARGS() != 6) { values[3] = Int64GetDatum(path[funcctx->call_cntr].start_id); diff --git a/src/ksp/withPoints_ksp.c b/src/ksp/withPoints_ksp.c index 17389ee0a38..554e02e3c94 100644 --- a/src/ksp/withPoints_ksp.c +++ b/src/ksp/withPoints_ksp.c @@ -313,8 +313,8 @@ PGDLLEXPORT Datum _pgr_withpointsksp(PG_FUNCTION_ARGS) { } } - values[0] = Int32GetDatum(funcctx->call_cntr + 1); - values[1] = Int32GetDatum(path_id); + values[0] = Int32GetDatum((int32_t)funcctx->call_cntr + 1); + values[1] = Int32GetDatum((int32_t)path_id); values[2] = Int32GetDatum(result_tuples[funcctx->call_cntr].seq); if (PG_NARGS() != 9) { values[3] = Int64GetDatum(result_tuples[funcctx->call_cntr].start_id); diff --git a/src/max_flow/pgr_maxflow.cpp b/src/max_flow/pgr_maxflow.cpp index 553e105aa60..dad55491edb 100644 --- a/src/max_flow/pgr_maxflow.cpp +++ b/src/max_flow/pgr_maxflow.cpp @@ -1,4 +1,5 @@ /*PGR-GNU***************************************************************** +File: pgr_maxflow.cpp Copyright (c) 2015 pgRouting developers Mail: project@pgrouting.org @@ -84,7 +85,7 @@ void PgrFlowGraph::insert_edges_push_relabel( boost::add_edge(v2, v1, graph); E_to_id.insert(std::pair(e1, edge.id)); E_to_id.insert(std::pair(e1_rev, edge.id)); - capacity[e1] = (int64_t) edge.cost; + capacity[e1] = static_cast(edge.cost); capacity[e1_rev] = 0; rev[e1] = e1_rev; rev[e1_rev] = e1; @@ -95,7 +96,7 @@ void PgrFlowGraph::insert_edges_push_relabel( boost::add_edge(v1, v2, graph); E_to_id.insert(std::pair(e2, edge.id)); E_to_id.insert(std::pair(e2_rev, edge.id)); - capacity[e2] = (int64_t) edge.reverse_cost; + capacity[e2] = static_cast(edge.reverse_cost); capacity[e2_rev] = 0; rev[e2] = e2_rev; rev[e2_rev] = e2; @@ -118,9 +119,9 @@ void PgrFlowGraph::insert_edges( boost::add_edge(v2, v1, graph); E_to_id.insert(std::pair(e, edge.id)); E_to_id.insert(std::pair(e_rev, edge.id)); - capacity[e] = edge.cost > 0 ? (int64_t) edge.cost : 0; + capacity[e] = edge.cost > 0 ? static_cast(edge.cost) : 0; capacity[e_rev] = edge.reverse_cost > 0 - ? (int64_t) edge.reverse_cost : 0; + ? static_cast(edge.reverse_cost) : 0; rev[e] = e_rev; rev[e_rev] = e; } @@ -210,7 +211,7 @@ PgrFlowGraph::get_flow_edges() const { if (((capacity[*e] - residual_capacity[*e]) > 0) && ((*e).m_source != supersource) && ((*e).m_target != supersink)) { - Flow_t edge; + Flow_t edge = {}; edge.edge = get_edge_id(*e); edge.source = get_vertex_id((*e).m_source); edge.target = get_vertex_id((*e).m_target); @@ -280,8 +281,7 @@ PgrFlowGraph::get_edge_disjoint_paths( bool exists; size_t j; for (j = 0; j < size - 1; j++) { - Path_rt edge; - edge.seq = static_cast(j + 1); + Path_rt edge = {}; edge.start_id = paths[i][0]; edge.end_id = paths[i][size - 1]; edge.node = paths[i][j]; @@ -291,8 +291,7 @@ PgrFlowGraph::get_edge_disjoint_paths( edge.edge = get_edge_id(e); path_elements.push_back(edge); } - Path_rt edge; - edge.seq = static_cast(j + 1); + Path_rt edge = {}; edge.start_id = paths[i][0]; edge.end_id = paths[i][size - 1]; edge.node = paths[i][j]; diff --git a/src/trsp/trspVia_driver.cpp b/src/trsp/trspVia_driver.cpp index 707fca73e75..4c6a18a3fd4 100644 --- a/src/trsp/trspVia_driver.cpp +++ b/src/trsp/trspVia_driver.cpp @@ -57,7 +57,9 @@ post_process_trspvia(std::deque &paths, std::vector vi auto u = via.front(); bool skip = true; for (const auto &v : via) { - if (skip) {skip = false; continue;} + if (skip) { + skip = false; continue; + } /* * look for the path (u,v) */ diff --git a/src/trsp/trspVia_withPoints_driver.cpp b/src/trsp/trspVia_withPoints_driver.cpp index 791fbdbe826..2e4748e08db 100644 --- a/src/trsp/trspVia_withPoints_driver.cpp +++ b/src/trsp/trspVia_withPoints_driver.cpp @@ -55,7 +55,9 @@ post_process_trspvia(std::deque &paths, std::vector vi auto u = via.front(); bool skip = true; for (const auto &v : via) { - if (skip) {skip = false; continue;} + if (skip) { + skip = false; continue; + } /* * look for the path (u,v) */ diff --git a/src/withPoints/pgr_withPoints.cpp b/src/withPoints/pgr_withPoints.cpp index 84cf9b698a3..6443697d9ab 100644 --- a/src/withPoints/pgr_withPoints.cpp +++ b/src/withPoints/pgr_withPoints.cpp @@ -341,7 +341,6 @@ Pg_points_graph::create_new_edges() { << point.vertex_id << "\n"; } - int64_t vertex_id = 1; std::vector< Point_on_edge_t > new_points; for (const auto edge : m_edges_of_points) { std::set< Point_on_edge_t, pointCompare> points_on_edge; @@ -400,7 +399,6 @@ Pg_points_graph::create_new_edges() { if (point.fraction > 0 && point.fraction < 1) { log << "vertex_id of the point is " << -point.pid << "\n"; point.vertex_id = -point.pid; - ++vertex_id; } new_points.push_back(point); diff --git a/tools/developer/translate.sh b/tools/developer/translate.sh deleted file mode 100755 index 1d726640241..00000000000 --- a/tools/developer/translate.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash -# /*PGR-GNU***************************************************************** -# File: translate.sh -# Copyright (c) 2017 pgRouting developers -# Mail: project@pgrouting.org -# ------ -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# ********************************************************************PGR-GNU*/ -set -e - - -cd build/ -rm -rf ./* -cmake -DHTML=ON -DDOC_USE_BOOTSTRAP=ON .. -make doc -cd .. - - -#tools/testers/doc_queries_generator.pl -alg pickDeliver - -#tools/testers/doc_queries_generator.pl -documentation -cd build -#make doc -cd .. - - - -exit 0 - -gource --seconds-per-day 0.1 \ - --auto-skip-seconds 0.3 \ - --max-file-lag 0.1 \ - --logo doc/static/images/pgrouting-logo.png ---date-format "%B %Y" \ - --hide filenames,dirnames \ - --start-position 0.1 \ - --disable-auto-rotate \ - ----file-idle-time 10 \ - -f -1280x720 \ - --output-ppm-stream release-2.4.ppm - -ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i release-2.4.ppm -vcodec libx264 -preset ultrafast -pix_fmt yuv420p -crf 1 -threads 0 -bf 0 release-2.4.mp4 diff --git a/tools/scripts/code_checker.sh b/tools/scripts/code_checker.sh index def08ebbad1..65384675137 100755 --- a/tools/scripts/code_checker.sh +++ b/tools/scripts/code_checker.sh @@ -48,15 +48,18 @@ if test -z "$DIRECTORY"; then echo "--------------------" echo "------ *.c ------" echo "--------------------" - code_linter/cpplint/cpplint.py --extensions=c --linelength=120 --filter=-readability/casting src/*/*.c + code_linter/cpplint/cpplint.py --extensions=c --linelength=120 --filter=-readability/casting,-whitespace/newline src/*/*.c echo "--------------------" echo "------ *.cpp ------" echo "--------------------" - code_linter/cpplint/cpplint.py --filter=-runtime/references --linelength=120 src/*/*.cpp + code_linter/cpplint/cpplint.py --linelength=120 \ + --filter=-runtime/references,-whitespace/indent_namespace \ + src/*/*.cpp echo "--------------------" echo "------ HEADERS ------" echo "--------------------" - code_linter/cpplint/cpplint.py --extensions=hpp,h --headers=hpp,h --linelength=120 --filter=-runtime/references \ + code_linter/cpplint/cpplint.py --extensions=hpp,h --headers=hpp,h --linelength=120 \ + --filter=-runtime/references,-whitespace/indent_namespace \ include/*/*.h* \ include/*/*/*.h* @@ -66,7 +69,8 @@ else echo "--------------------" echo "------ IN PLACE HEADERS ------" echo "--------------------" - code_linter/cpplint/cpplint.py --extensions=hpp,h --headers=hpp,h --linelength=120 --filter=-runtime/references \ + code_linter/cpplint/cpplint.py --extensions=hpp,h --headers=hpp,h --linelength=120 \ + --filter=-runtime/references \ include/*/*.h* \ include/*/*/*.h* @@ -74,11 +78,16 @@ else echo "--------------------" echo "------ *.c ------" echo "--------------------" - code_linter/cpplint/cpplint.py --extensions=c --linelength=120 --filter=-readability/casting src/"$DIRECTORY"/*.c + code_linter/cpplint/cpplint.py --extensions=c --linelength=120 \ + --filter=-readability/casting \ + src/"$DIRECTORY"/*.c + echo "--------------------" echo "------ *.cpp ------" echo "--------------------" - code_linter/cpplint/cpplint.py --linelength=120 --filter=-runtime/references src/"$DIRECTORY"/*.cpp + code_linter/cpplint/cpplint.py --linelength=120 \ + --filter=-runtime/references \ + src/"$DIRECTORY"/*.cpp echo "--------------------" echo "------ C HEADER ------" echo "--------------------" @@ -89,11 +98,9 @@ else echo "--------------------" echo "------ C++ HEADER ------" echo "--------------------" - code_linter/cpplint/cpplint.py --extensions=hpp,h --headers=hpp --linelength=120 --filter=-runtime/references include/"$DIRECTORY"/*.h* - echo "--------------------" - echo "------ this shouild fail ------" - echo "--------------------" - code_linter/cpplint/cpplint.py src/"$DIRECTORY"/src/*.h* + code_linter/cpplint/cpplint.py --extensions=hpp,h --headers=hpp,h --linelength=120 \ + --filter=-runtime/references \ + include/"$DIRECTORY"/*.h* fi fi diff --git a/tools/testers/pg_prove_tests.sh b/tools/testers/pg_prove_tests.sh index f0858eb86de..28c36d38828 100755 --- a/tools/testers/pg_prove_tests.sh +++ b/tools/testers/pg_prove_tests.sh @@ -37,7 +37,7 @@ echo "$PGPORT" pushd ./tools/testers/ || exit 1 -bash setup_db.sh "${PGPORT}" "${PGDATABASE}" "${PGUSER}" "3.6.2" +bash setup_db.sh "${PGPORT}" "${PGDATABASE}" "${PGUSER}" "3.6.3" pg_prove --failures --Q --recurse \ --S client_min_messages=WARNING \