• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PowerDNS / pdns / 17094357417

20 Aug 2025 09:28AM UTC coverage: 30.381% (-34.3%) from 64.683%
17094357417

Pull #15994

github

web-flow
Merge de3b7cf17 into b46c65b05
Pull Request #15994: REST API: normalize record contents received

9841 of 44300 branches covered (22.21%)

Branch coverage included in aggregate %.

0 of 30 new or added lines in 1 file covered. (0.0%)

27380 existing lines in 238 files now uncovered.

28140 of 80715 relevant lines covered (34.86%)

860897.95 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/ext/protozero/include/protozero/buffer_string.hpp
1
#ifndef PROTOZERO_BUFFER_STRING_HPP
2
#define PROTOZERO_BUFFER_STRING_HPP
3

4
/*****************************************************************************
5

6
protozero - Minimalistic protocol buffer decoder and encoder in C++.
7

8
This file is from https://github.com/mapbox/protozero where you can find more
9
documentation.
10

11
*****************************************************************************/
12

13
/**
14
 * @file buffer_string.hpp
15
 *
16
 * @brief Contains the customization points for buffer implementation based
17
 *        on std::string
18
 */
19

20
#include "buffer_tmpl.hpp"
21
#include "config.hpp"
22

23
#include <cstddef>
24
#include <iterator>
25
#include <string>
26

27
namespace protozero {
28

29
// Implementation of buffer customizations points for std::string
30

31
/// @cond INTERNAL
32
template <>
33
struct buffer_customization<std::string> {
34

UNCOV
35
    static std::size_t size(const std::string* buffer) noexcept {
×
UNCOV
36
        return buffer->size();
×
UNCOV
37
    }
×
38

UNCOV
39
    static void append(std::string* buffer, const char* data, std::size_t count) {
×
UNCOV
40
        buffer->append(data, count);
×
UNCOV
41
    }
×
42

UNCOV
43
    static void append_zeros(std::string* buffer, std::size_t count) {
×
UNCOV
44
        buffer->append(count, '\0');
×
UNCOV
45
    }
×
46

UNCOV
47
    static void resize(std::string* buffer, std::size_t size) {
×
UNCOV
48
        protozero_assert(size < buffer->size());
×
49
        buffer->resize(size);
×
UNCOV
50
    }
×
51

UNCOV
52
    static void reserve_additional(std::string* buffer, std::size_t size) {
×
UNCOV
53
        buffer->reserve(buffer->size() + size);
×
UNCOV
54
    }
×
55

UNCOV
56
    static void erase_range(std::string* buffer, std::size_t from, std::size_t to) {
×
UNCOV
57
        protozero_assert(from <= buffer->size());
×
UNCOV
58
        protozero_assert(to <= buffer->size());
×
UNCOV
59
        protozero_assert(from <= to);
×
UNCOV
60
        buffer->erase(buffer->begin() + static_cast<std::string::difference_type>(from),
×
UNCOV
61
                      buffer->begin() + static_cast<std::string::difference_type>(to));
×
UNCOV
62
    }
×
63

UNCOV
64
    static char* at_pos(std::string* buffer, std::size_t pos) {
×
UNCOV
65
        protozero_assert(pos <= buffer->size());
×
UNCOV
66
        return (&*buffer->begin()) + pos;
×
UNCOV
67
    }
×
68

UNCOV
69
    static void push_back(std::string* buffer, char ch) {
×
UNCOV
70
        buffer->push_back(ch);
×
UNCOV
71
    }
×
72

73
};
74
/// @endcond
75

76
} // namespace protozero
77

78
#endif // PROTOZERO_BUFFER_STRING_HPP
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc