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
commit39bd936c4ba5ee3ff5a0b82a86b87c2ca0aa2763 (patch)
treecc33480d9fa92b3681b8e414b7422d03bd736c3e /gtk/Converter.h
parentb67d2d947839355521a8fe044efef6d10f31e70d (diff)
downloadscintilla-mirror-39bd936c4ba5ee3ff5a0b82a86b87c2ca0aa2763.tar.gz
Backport: Replace NULL/0 with nullptr. Mark noexcept where simple.
Move some static functions into anonymous namespace. Backport of changeset 7338:1238cda7364d.
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 {