Code cleanups

on behalf of Lebedev, see issue 1355
This commit is contained in:
Oliver Duis
2012-05-06 22:10:37 +02:00
parent 686188d6bb
commit 1483ecb47c
125 changed files with 750 additions and 747 deletions

View File

@@ -162,12 +162,12 @@ public:
}
// use as pointer to T**
operator T**() {
operator T**() const {
return ptr;
}
// use as pointer to data
operator T*() {
operator T*() const {
// only if owner this will return a valid pointer
return data;
}
@@ -210,14 +210,14 @@ public:
ar_realloc(w,h);
memcpy(data, copy, w * h * sizeof(T));
}
int width() {
int width() const {
return x;
}
int height() {
int height() const {
return y;
}
operator bool() {
operator bool() const {
return (x > 0 && y > 0);
}