projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
wxGTK compile fixes for my wxMSW changes
[wxWidgets.git]
/
include
/
wx
/
buffer.h
diff --git
a/include/wx/buffer.h
b/include/wx/buffer.h
index 9bed7fca305a06c4bfdeadec200b4410ded4eba2..afc077699482ea45ad6b246cfda58893dabc9533 100644
(file)
--- a/
include/wx/buffer.h
+++ b/
include/wx/buffer.h
@@
-17,13
+17,6
@@
#include "wx/wxchar.h"
#include <string.h> // strdup
#include "wx/wxchar.h"
#include <string.h> // strdup
-// wchar.h isn't available on my system (Linux, g++ 2.7.2). JACS.
-#ifdef __LINUX__
-#include <wcstr.h>
-#else
-#include <wchar.h> // wchar_t
-#endif
-
// ----------------------------------------------------------------------------
// Special classes for (wide) character strings: they use malloc/free instead
// of new/delete
// ----------------------------------------------------------------------------
// Special classes for (wide) character strings: they use malloc/free instead
// of new/delete
@@
-61,11
+54,13
@@
public:
}
operator const char *() const { return m_str; }
}
operator const char *() const { return m_str; }
+ char operator[](size_t n) const { return m_str[n]; }
private:
char *m_str;
};
private:
char *m_str;
};
+#if wxUSE_WCHAR_T
class wxWCharBuffer
{
public:
class wxWCharBuffer
{
public:
@@
-104,10
+99,12
@@
public:
}
operator const wchar_t *() const { return m_wcs; }
}
operator const wchar_t *() const { return m_wcs; }
-
+ wchar_t operator[](size_t n) const { return m_wcs[n]; }
+
private:
wchar_t *m_wcs;
};
private:
wchar_t *m_wcs;
};
+#endif
#if wxUSE_UNICODE
#define wxMB2WXbuf wxWCharBuffer
#if wxUSE_UNICODE
#define wxMB2WXbuf wxWCharBuffer