summaryrefslogtreecommitdiff
path: root/includes/Handle.h
diff options
context:
space:
mode:
authorNicolas "Pixel" Noble <pixel@nobis-crew.org>2012-04-13 19:31:23 +0200
committerNicolas "Pixel" Noble <pixel@nobis-crew.org>2012-04-13 19:31:28 +0200
commit56d91ddd2cd42b782cde0bb3fdf4eb9ebe7597be (patch)
treeabd2a51503f3a8845d1b381fca671958ce00da46 /includes/Handle.h
parent869b8141a8383171334129859789155f3ad42f90 (diff)
Fixing my constant-strings constructs (Thanks Kurtis!)
Diffstat (limited to 'includes/Handle.h')
-rw-r--r--includes/Handle.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/Handle.h b/includes/Handle.h
index 5634583..7c502ea 100644
--- a/includes/Handle.h
+++ b/includes/Handle.h
@@ -40,7 +40,7 @@ class Handle {
virtual const char * getName() = 0;
virtual ssize_t read(void * buf, size_t count) throw (GeneralException);
virtual ssize_t write(const void * buf, size_t count) throw (GeneralException);
- template <ssize_t L> void writeString(const char str[L]) { writeString(str, L - 1); }
+ template <size_t L> void writeString(const char (&str)[L]) { writeString(str, L - 1); }
void writeString(const char * str, ssize_t len) { if (len < 0) len = strlen(str); forceWrite(str, len); }
void writeString(const String & str) { forceWrite(str.to_charp(), str.strlen()); }
void seek(off_t offset, int whence = SEEK_SET) { rseek(offset, whence); }