diff options
author | Neil <nyamatongwe@gmail.com> | 2018-04-21 16:19:19 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2018-04-21 16:19:19 +1000 |
commit | e5afba6e119511b90bb8bc533a0d1414735bc6bd (patch) | |
tree | 42b38c0ac72a36ee9ee8ed80624fd4eaa3fdc702 /src/PositionCache.h | |
parent | d05d7fbd132b6a8060b3f0fa3a7a56cfaa0c41e0 (diff) | |
download | scintilla-mirror-e5afba6e119511b90bb8bc533a0d1414735bc6bd.tar.gz |
Code improvements - noexcept and intialization.
Diffstat (limited to 'src/PositionCache.h')
-rw-r--r-- | src/PositionCache.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/PositionCache.h b/src/PositionCache.h index f23823bdf..fcbb1cdf7 100644 --- a/src/PositionCache.h +++ b/src/PositionCache.h @@ -23,11 +23,11 @@ public: double x; double y; - explicit PointDocument(double x_ = 0, double y_ = 0) : x(x_), y(y_) { + explicit PointDocument(double x_ = 0, double y_ = 0) noexcept : x(x_), y(y_) { } // Conversion from Point. - explicit PointDocument(Point pt) : x(pt.x), y(pt.y) { + explicit PointDocument(Point pt) noexcept : x(pt.x), y(pt.y) { } }; @@ -172,10 +172,10 @@ struct TextSegment { int start; int length; const Representation *representation; - TextSegment(int start_=0, int length_=0, const Representation *representation_=0) : + TextSegment(int start_=0, int length_=0, const Representation *representation_=nullptr) noexcept : start(start_), length(length_), representation(representation_) { } - int end() const { + int end() const noexcept { return start + length; } }; |