aboutsummaryrefslogtreecommitdiffhomepage
path: root/gtk/Converter.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2019-03-27 08:34:16 +1100
committerNeil <nyamatongwe@gmail.com>2019-03-27 08:34:16 +1100
commitff4e7e74e24d88194e01a78f9c5b2649bbcc1a59 (patch)
treed8ec063c8a5a7afc16022005bd4fe109b22a763e /gtk/Converter.h
parenta29736e309ee7d0b8ca588674024c2deb6923090 (diff)
downloadscintilla-mirror-ff4e7e74e24d88194e01a78f9c5b2649bbcc1a59.tar.gz
Replace NULL/0 with nullptr. Mark noexcept where simple.
Move some static functions into anonymous namespace.
Diffstat (limited to 'gtk/Converter.h')
-rw-r--r--gtk/Converter.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/gtk/Converter.h b/gtk/Converter.h
index 0ef80ae23..fa9a101f1 100644
--- a/gtk/Converter.h
+++ b/gtk/Converter.h
@@ -15,14 +15,14 @@ const gsize sizeFailure = static_cast<gsize>(-1);
*/
class Converter {
GIConv iconvh;
- void OpenHandle(const char *fullDestination, const char *charSetSource) {
+ void OpenHandle(const char *fullDestination, const char *charSetSource) noexcept {
iconvh = g_iconv_open(fullDestination, charSetSource);
}
- bool Succeeded() const {
+ bool Succeeded() const noexcept {
return iconvh != iconvhBad;
}
public:
- Converter() {
+ Converter() noexcept {
iconvh = iconvhBad;
}
Converter(const char *charSetDestination, const char *charSetSource, bool transliterations) {
@@ -32,7 +32,7 @@ public:
~Converter() {
Close();
}
- operator bool() const {
+ operator bool() const noexcept {
return Succeeded();
}
void Open(const char *charSetDestination, const char *charSetSource, bool transliterations) {
@@ -50,13 +50,13 @@ public:
}
}
}
- void Close() {
+ void Close() noexcept {
if (Succeeded()) {
g_iconv_close(iconvh);
iconvh = iconvhBad;
}
}
- gsize Convert(char** src, gsize *srcleft, char **dst, gsize *dstleft) const {
+ gsize Convert(char** src, gsize *srcleft, char **dst, gsize *dstleft) const noexcept {
if (!Succeeded()) {
return sizeFailure;
} else {