diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2019-02-19 01:25:45 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2019-02-19 01:25:45 +0100 |
commit | 3362e2fb538c9426635e2fda8d9737662b48fc06 (patch) | |
tree | b7fe6dc049bb7a86e5ece3500bafaf8992984f9c /strbuf.h | |
parent | Started full rewrite in C++. (diff) | |
download | calp-3362e2fb538c9426635e2fda8d9737662b48fc06.tar.gz calp-3362e2fb538c9426635e2fda8d9737662b48fc06.tar.xz |
I somehow got stuff to bulid, now it just doesn't link.
Diffstat (limited to 'strbuf.h')
-rw-r--r-- | strbuf.h | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -4,6 +4,7 @@ #include <unistd.h> #include <cstdlib> #include <cstring> +#include <string> /* * 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); |