From b7c8c51486d337841d12cd3c2420062419b88fbe Mon Sep 17 00:00:00 2001 From: tastytea Date: Sat, 20 Oct 2018 05:46:53 +0200 Subject: [PATCH] Removed direct boost dependency --- .drone.yml | 12 ++++++------ src/whyblocked.cpp | 7 +++---- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.drone.yml b/.drone.yml index aae85d0..fb3cb23 100644 --- a/.drone.yml +++ b/.drone.yml @@ -8,7 +8,7 @@ pipeline: - rm /etc/apt/apt.conf.d/docker-clean - apt-get update -q - apt-get install -qy build-essential cmake pkg-config - - apt-get install -qy libvsqlitepp-dev libboost-all-dev libxdg-basedir-dev qt5-default qttools5-dev-tools + - apt-get install -qy libvsqlitepp-dev libboost-dev libxdg-basedir-dev qt5-default qttools5-dev-tools - apt-get install -qy rpm file - rm -rf build && mkdir -p build && cd build - cmake .. @@ -42,7 +42,7 @@ pipeline: - apt-get install -qy -t xenial g++-7 - update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 100 - update-alternatives --set g++ /usr/bin/g++-7 - - apt-get install -qy libvsqlitepp-dev libboost-all-dev libxdg-basedir-dev qt5-default qttools5-dev-tools + - apt-get install -qy libvsqlitepp-dev libboost-dev libxdg-basedir-dev qt5-default qttools5-dev-tools - apt-get install -qy rpm file - rm -rf build && mkdir -p build && cd build - cmake .. @@ -76,7 +76,7 @@ pipeline: - apt-get install -qy -t xenial g++-8 - update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 100 - update-alternatives --set g++ /usr/bin/g++-8 - - apt-get install -qy libvsqlitepp-dev libboost-all-dev libxdg-basedir-dev qt5-default qttools5-dev-tools + - apt-get install -qy libvsqlitepp-dev libboost-dev libxdg-basedir-dev qt5-default qttools5-dev-tools - apt-get install -qy rpm file - rm -rf build && mkdir -p build && cd build - cmake .. @@ -102,7 +102,7 @@ pipeline: - rm /etc/apt/apt.conf.d/docker-clean - apt-get update -q - apt-get install -qy build-essential clang cmake pkg-config - - apt-get install -qy libvsqlitepp-dev libboost-all-dev libxdg-basedir-dev qt5-default qttools5-dev-tools + - apt-get install -qy libvsqlitepp-dev libboost-dev libxdg-basedir-dev qt5-default qttools5-dev-tools - apt-get install -qy rpm file - rm -rf build && mkdir -p build && cd build - cmake .. @@ -130,7 +130,7 @@ pipeline: - echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/sid.list - apt-get update -q - apt-get install -qy build-essential cmake pkg-config - - apt-get install -qy libvsqlitepp-dev libboost-all-dev libxdg-basedir-dev qt5-default qttools5-dev-tools + - apt-get install -qy libvsqlitepp-dev libboost-dev libxdg-basedir-dev qt5-default qttools5-dev-tools - apt-get install -qy rpm file - apt-get install -qy -t stretch-backports clang-5.0 - rm -rf build && mkdir -p build && cd build @@ -159,7 +159,7 @@ pipeline: - echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/sid.list - apt-get update -q - apt-get install -qy build-essential cmake pkg-config - - apt-get install -qy libvsqlitepp-dev libboost-all-dev libxdg-basedir-dev qt5-default qttools5-dev-tools + - apt-get install -qy libvsqlitepp-dev libboost-dev libxdg-basedir-dev qt5-default qttools5-dev-tools - apt-get install -qy rpm file - apt-get install -qy -t stretch-backports clang-6.0 - rm -rf build && mkdir -p build && cd build diff --git a/src/whyblocked.cpp b/src/whyblocked.cpp index 09b82bf..a4a9f71 100644 --- a/src/whyblocked.cpp +++ b/src/whyblocked.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include "whyblocked.hpp" using std::cerr; @@ -118,7 +117,7 @@ const bool database::view(result_view &result) { sqlite::connection con(get_filepath()); sqlite::query q(con, "SELECT * FROM blocks;"); - boost::shared_ptr res = q.get_result(); + sqlite::result_type res = q.get_result(); while(res->next_row()) { result.push_back( @@ -144,10 +143,10 @@ const bool database::details(const string &user, result_details &result) { sqlite::connection con(get_filepath()); sqlite::query q_blocks(con, "SELECT * FROM blocks WHERE user = \'" + user + "\';"); - boost::shared_ptr res_blocks = q_blocks.get_result(); + sqlite::result_type res_blocks = q_blocks.get_result(); sqlite::query q_urls(con, "SELECT * FROM urls WHERE user = \'" + user + "\';"); - boost::shared_ptr res_urls = q_urls.get_result(); + sqlite::result_type res_urls = q_urls.get_result(); if (!res_blocks->next_row()) {