Makes operator to use string_view

This commit is contained in:
Felipe Zimmerle
2019-03-05 12:26:44 -03:00
parent 9699ec7f44
commit 1d33015934
85 changed files with 1954 additions and 298 deletions

View File

@@ -27,10 +27,13 @@
#include <vector>
#include <algorithm>
#include <memory>
#include "modsecurity/string_view.hpp"
#endif
#include "modsecurity/variable_value.h"
#ifndef HEADERS_MODSECURITY_ANCHORED_SET_VARIABLE_H_
#define HEADERS_MODSECURITY_ANCHORED_SET_VARIABLE_H_
@@ -79,6 +82,12 @@ class AnchoredSetVariable : public std::unordered_multimap<std::string,
void set(const std::string &key, const std::string &value,
size_t offset);
void set(const std::string &key, const bpstd::string_view &value,
size_t offset);
void set(const std::string &key, const char *value,
size_t offset);
void set(const std::string &key, const std::string &value,
size_t offset, size_t len);

View File

@@ -26,10 +26,14 @@
#include <utility>
#include <vector>
#include <memory>
#include <cstring>
#include "modsecurity/string_view.hpp"
#endif
#include "modsecurity/variable_value.h"
#ifndef HEADERS_MODSECURITY_ANCHORED_VARIABLE_H_
#define HEADERS_MODSECURITY_ANCHORED_VARIABLE_H_
@@ -59,6 +63,8 @@ class AnchoredVariable {
void unset();
void set(const std::string &a, size_t offset);
void set(const bpstd::string_view &a, size_t offset);
void set(const char *a, size_t offset);
void set(const std::string &a, size_t offset, size_t offsetLen);
void append(const std::string &a, size_t offset,
bool spaceSeparator = false);

File diff suppressed because it is too large Load Diff