add move c'tor to Header
This commit is contained in:
parent
15f62e680a
commit
56cdabff6a
@ -29,18 +29,24 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||||||
#define HTTP_HEADER_H
|
#define HTTP_HEADER_H
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <algorithm>
|
||||||
|
|
||||||
namespace http
|
namespace http
|
||||||
{
|
{
|
||||||
struct Header
|
struct Header
|
||||||
{
|
{
|
||||||
std::string name;
|
Header& operator=(const Header& other) = default;
|
||||||
std::string value;
|
Header(const std::string & name, const std::string & value) : name(name), value(value) {}
|
||||||
|
Header(const Header && other) : name(std::move(other.name)), value(std::move(other.value)) {}
|
||||||
|
|
||||||
void Clear()
|
void Clear()
|
||||||
{
|
{
|
||||||
name.clear();
|
name.clear();
|
||||||
value.clear();
|
value.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
std::string name;
|
||||||
|
std::string value;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user