diff options
| author | Neil <nyamatongwe@gmail.com> | 2021-09-15 09:39:04 +1000 | 
|---|---|---|
| committer | Neil <nyamatongwe@gmail.com> | 2021-09-15 09:39:04 +1000 | 
| commit | bd26e824df79006bf8f5385e8d604d8fcbc01eae (patch) | |
| tree | 264cec6e5eb965a7c7fafaa8e313106275914135 /src/ViewStyle.cxx | |
| parent | d4a5d7d6955982496ba523a439fc98276a28e2d8 (diff) | |
| download | scintilla-mirror-bd26e824df79006bf8f5385e8d604d8fcbc01eae.tar.gz | |
Avoid some type warnings
Diffstat (limited to 'src/ViewStyle.cxx')
| -rw-r--r-- | src/ViewStyle.cxx | 12 | 
1 files changed, 5 insertions, 7 deletions
| diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index 9aab26e0a..8d2421b7a 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -442,14 +442,13 @@ int ViewStyle::ExternalMarginWidth() const noexcept {  }  int ViewStyle::MarginFromLocation(Point pt) const noexcept { -	int margin = -1; -	int x = marginInside ? 0 : -fixedColumnWidth; +	XYPOSITION x = marginInside ? 0 : -fixedColumnWidth;  	for (size_t i = 0; i < ms.size(); i++) {  		if ((pt.x >= x) && (pt.x < x + ms[i].width)) -			margin = static_cast<int>(i); +			return static_cast<int>(i);  		x += ms[i].width;  	} -	return margin; +	return -1;  }  bool ViewStyle::ValidStyle(size_t styleIndex) const noexcept { @@ -552,14 +551,13 @@ ColourRGBA ViewStyle::WrapColour() const {  }  // Insert new edge in sorted order. -void ViewStyle::AddMultiEdge(uptr_t wParam, sptr_t lParam) { -	const int column = static_cast<int>(wParam); +void ViewStyle::AddMultiEdge(int column, ColourRGBA colour) {  	theMultiEdge.insert(  		std::upper_bound(theMultiEdge.begin(), theMultiEdge.end(), column,  			[](const EdgeProperties &a, const EdgeProperties &b) {  				return a.column < b.column;  			}), -		EdgeProperties(column, lParam)); +		EdgeProperties(column, colour));  }  std::optional<ColourRGBA> ViewStyle::ElementColour(Element element) const { | 
