From 3362e2fb538c9426635e2fda8d9737662b48fc06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Tue, 19 Feb 2019 01:25:45 +0100 Subject: I somehow got stuff to bulid, now it just doesn't link. --- strbuf.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'strbuf.h') diff --git a/strbuf.h b/strbuf.h index 07580f63..bf109daf 100644 --- a/strbuf.h +++ b/strbuf.h @@ -4,6 +4,7 @@ #include #include #include +#include /* * A high level string type which holds it's own length, how much @@ -32,11 +33,11 @@ struct strbuf { */ void realloc (size_t len); - bool operator==(strbuf& other) { - return strncmp(this->mem, other.mem, this->len) == 0; - } - bool operator==(char* other) - { strncmp(this->mem, other, this->len) == 0 ; } + bool operator==(strbuf& other) + { return strncmp(this->mem, other.mem, this->len) == 0; } + + bool operator==(const char* other) + { return strncmp(this->mem, other, this->len) == 0 ; } strbuf& operator=(strbuf* other); -- cgit v1.2.3