aboutsummaryrefslogtreecommitdiff
path: root/c/wcharptr.h
diff options
context:
space:
mode:
Diffstat (limited to 'c/wcharptr.h')
-rw-r--r--c/wcharptr.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/c/wcharptr.h b/c/wcharptr.h
index 1f579b5..2267017 100644
--- a/c/wcharptr.h
+++ b/c/wcharptr.h
@@ -3,29 +3,29 @@
#include <windows.h>
-/* wchar_ptr: Simple wrapper for wide C strings. */
-struct wchar_ptr
+/* WcharPtr: Simple wrapper for wide C strings. */
+struct WcharPtr
{
/* Named copy constructors (expensive). */
- static wchar_ptr from_narrow(const char* buf, int cp = CP_UTF8);
- static wchar_ptr copy(const wchar_t* s);
+ static WcharPtr FromNarrow(const char* buf, int cp = CP_UTF8);
+ static WcharPtr Copy(const wchar_t* s);
/* Non-explicit copies are disabled. */
- wchar_ptr(wchar_ptr& other) = delete;
- wchar_ptr& operator=(wchar_ptr& other) = delete;
+ WcharPtr(WcharPtr& other) = delete;
+ WcharPtr& operator=(WcharPtr& other) = delete;
- wchar_ptr() noexcept;
- ~wchar_ptr();
+ WcharPtr() noexcept;
+ ~WcharPtr();
operator wchar_t*() noexcept;
- wchar_ptr(wchar_t* s) noexcept;
- wchar_ptr& operator=(wchar_t* s) noexcept;
+ WcharPtr(wchar_t* s) noexcept;
+ WcharPtr& operator=(wchar_t* s) noexcept;
- wchar_ptr(wchar_ptr&& other) noexcept;
- wchar_ptr& operator=(wchar_ptr&& other) noexcept;
+ WcharPtr(WcharPtr&& other) noexcept;
+ WcharPtr& operator=(WcharPtr&& other) noexcept;
/* Return pointer, releasing ownership. */
- wchar_t *release() noexcept;
+ wchar_t *Release() noexcept;
private:
wchar_t* m_p = nullptr;
};