Removed direct boost dependency
parent
7fd0412eb1
commit
b7c8c51486
12
.drone.yml
12
.drone.yml
|
@ -8,7 +8,7 @@ pipeline:
|
||||||
- rm /etc/apt/apt.conf.d/docker-clean
|
- rm /etc/apt/apt.conf.d/docker-clean
|
||||||
- apt-get update -q
|
- apt-get update -q
|
||||||
- apt-get install -qy build-essential cmake pkg-config
|
- 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 rpm file
|
||||||
- rm -rf build && mkdir -p build && cd build
|
- rm -rf build && mkdir -p build && cd build
|
||||||
- cmake ..
|
- cmake ..
|
||||||
|
@ -42,7 +42,7 @@ pipeline:
|
||||||
- apt-get install -qy -t xenial g++-7
|
- apt-get install -qy -t xenial g++-7
|
||||||
- update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 100
|
- update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-7 100
|
||||||
- update-alternatives --set g++ /usr/bin/g++-7
|
- 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
|
- apt-get install -qy rpm file
|
||||||
- rm -rf build && mkdir -p build && cd build
|
- rm -rf build && mkdir -p build && cd build
|
||||||
- cmake ..
|
- cmake ..
|
||||||
|
@ -76,7 +76,7 @@ pipeline:
|
||||||
- apt-get install -qy -t xenial g++-8
|
- apt-get install -qy -t xenial g++-8
|
||||||
- update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 100
|
- update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 100
|
||||||
- update-alternatives --set g++ /usr/bin/g++-8
|
- 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
|
- apt-get install -qy rpm file
|
||||||
- rm -rf build && mkdir -p build && cd build
|
- rm -rf build && mkdir -p build && cd build
|
||||||
- cmake ..
|
- cmake ..
|
||||||
|
@ -102,7 +102,7 @@ pipeline:
|
||||||
- rm /etc/apt/apt.conf.d/docker-clean
|
- rm /etc/apt/apt.conf.d/docker-clean
|
||||||
- apt-get update -q
|
- apt-get update -q
|
||||||
- apt-get install -qy build-essential clang cmake pkg-config
|
- 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
|
- apt-get install -qy rpm file
|
||||||
- rm -rf build && mkdir -p build && cd build
|
- rm -rf build && mkdir -p build && cd build
|
||||||
- cmake ..
|
- cmake ..
|
||||||
|
@ -130,7 +130,7 @@ pipeline:
|
||||||
- echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/sid.list
|
- echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/sid.list
|
||||||
- apt-get update -q
|
- apt-get update -q
|
||||||
- apt-get install -qy build-essential cmake pkg-config
|
- 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 rpm file
|
||||||
- apt-get install -qy -t stretch-backports clang-5.0
|
- apt-get install -qy -t stretch-backports clang-5.0
|
||||||
- rm -rf build && mkdir -p build && cd build
|
- 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
|
- echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/sid.list
|
||||||
- apt-get update -q
|
- apt-get update -q
|
||||||
- apt-get install -qy build-essential cmake pkg-config
|
- 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 rpm file
|
||||||
- apt-get install -qy -t stretch-backports clang-6.0
|
- apt-get install -qy -t stretch-backports clang-6.0
|
||||||
- rm -rf build && mkdir -p build && cd build
|
- rm -rf build && mkdir -p build && cd build
|
||||||
|
|
|
@ -23,7 +23,6 @@
|
||||||
#include <sqlite/connection.hpp>
|
#include <sqlite/connection.hpp>
|
||||||
#include <sqlite/execute.hpp>
|
#include <sqlite/execute.hpp>
|
||||||
#include <sqlite/query.hpp>
|
#include <sqlite/query.hpp>
|
||||||
#include <boost/shared_ptr.hpp>
|
|
||||||
#include "whyblocked.hpp"
|
#include "whyblocked.hpp"
|
||||||
|
|
||||||
using std::cerr;
|
using std::cerr;
|
||||||
|
@ -118,7 +117,7 @@ const bool database::view(result_view &result)
|
||||||
{
|
{
|
||||||
sqlite::connection con(get_filepath());
|
sqlite::connection con(get_filepath());
|
||||||
sqlite::query q(con, "SELECT * FROM blocks;");
|
sqlite::query q(con, "SELECT * FROM blocks;");
|
||||||
boost::shared_ptr<sqlite::result> res = q.get_result();
|
sqlite::result_type res = q.get_result();
|
||||||
while(res->next_row())
|
while(res->next_row())
|
||||||
{
|
{
|
||||||
result.push_back(
|
result.push_back(
|
||||||
|
@ -144,10 +143,10 @@ const bool database::details(const string &user, result_details &result)
|
||||||
{
|
{
|
||||||
sqlite::connection con(get_filepath());
|
sqlite::connection con(get_filepath());
|
||||||
sqlite::query q_blocks(con, "SELECT * FROM blocks WHERE user = \'" + user + "\';");
|
sqlite::query q_blocks(con, "SELECT * FROM blocks WHERE user = \'" + user + "\';");
|
||||||
boost::shared_ptr<sqlite::result> 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 + "\';");
|
sqlite::query q_urls(con, "SELECT * FROM urls WHERE user = \'" + user + "\';");
|
||||||
boost::shared_ptr<sqlite::result> res_urls = q_urls.get_result();
|
sqlite::result_type res_urls = q_urls.get_result();
|
||||||
|
|
||||||
if (!res_blocks->next_row())
|
if (!res_blocks->next_row())
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue