Coverage Report

Created: 2026-07-30 07:14

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libtorrent/src/session_settings.cpp
Line
Count
Source
1
/*
2
3
Copyright (c) 2007, 2015, 2017, 2019-2021, Arvid Norberg
4
All rights reserved.
5
6
You may use, distribute and modify this code under the terms of the BSD license,
7
see LICENSE file.
8
*/
9
10
#include "libtorrent/aux_/session_settings.hpp"
11
#include "libtorrent/settings_pack.hpp"
12
13
#include <functional>
14
15
namespace libtorrent { namespace aux {
16
17
227
  session_settings::session_settings() = default;
18
19
  session_settings::session_settings(settings_pack const& p)
20
13
  {
21
13
    apply_pack_impl(&p, m_store);
22
13
  }
23
24
  void session_settings::bulk_set(std::function<void(session_settings_single_thread&)> f)
25
0
  {
26
0
    std::unique_lock<std::mutex> l(m_mutex);
27
0
    f(m_store);
28
0
  }
29
30
  void session_settings::bulk_get(std::function<void(session_settings_single_thread const&)> f) const
31
0
  {
32
0
    std::unique_lock<std::mutex> l(m_mutex);
33
0
    f(m_store);
34
0
  }
35
36
  session_settings_single_thread::session_settings_single_thread()
37
240
  {
38
240
    initialize_default_settings(*this);
39
240
  }
40
41
} }
42