diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/CaseConvert.cxx | 2 | ||||
| -rw-r--r-- | src/ContractionState.cxx | 2 | ||||
| -rw-r--r-- | src/Document.cxx | 2 | ||||
| -rw-r--r-- | src/EditView.cxx | 2 | ||||
| -rw-r--r-- | src/Editor.cxx | 4 | ||||
| -rw-r--r-- | src/PositionCache.cxx | 2 | ||||
| -rw-r--r-- | src/PositionCache.h | 2 | ||||
| -rw-r--r-- | src/RunStyles.cxx | 4 | ||||
| -rw-r--r-- | src/ViewStyle.cxx | 2 | 
9 files changed, 11 insertions, 11 deletions
| diff --git a/src/CaseConvert.cxx b/src/CaseConvert.cxx index a3391a7e2..d9d01b103 100644 --- a/src/CaseConvert.cxx +++ b/src/CaseConvert.cxx @@ -600,7 +600,7 @@ public:  	}  	virtual ~CaseConverter() = default;  	bool Initialised() const { -		return characters.size() > 0; +		return !characters.empty();  	}  	void Add(int character, const char *conversion) {  		characterToConversion.emplace_back(character, conversion); diff --git a/src/ContractionState.cxx b/src/ContractionState.cxx index 06b3b573d..1dd25cc4d 100644 --- a/src/ContractionState.cxx +++ b/src/ContractionState.cxx @@ -211,7 +211,7 @@ Sci::Line ContractionState<LINE>::DocFromDisplay(Sci::Line lineDisplay) const {  template <typename LINE>  void ContractionState<LINE>::InsertLines(Sci::Line lineDoc, Sci::Line lineCount) { -	for (int l = 0; l < lineCount; l++) { +	for (Sci::Line l = 0; l < lineCount; l++) {  		InsertLine(lineDoc + l);  	}  	Check(); diff --git a/src/Document.cxx b/src/Document.cxx index 54a358f0b..711f314e4 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -3191,7 +3191,7 @@ const char *BuiltinRegex::SubstituteByPosition(Document *doc, const char *text,  	substituted.clear();  	const DocumentIndexer di(doc, doc->Length());  	search.GrabMatches(di); -	for (int j = 0; j < *length; j++) { +	for (Sci::Position j = 0; j < *length; j++) {  		if (text[j] == '\\') {  			if (text[j + 1] >= '0' && text[j + 1] <= '9') {  				const unsigned int patNum = text[j + 1] - '0'; diff --git a/src/EditView.cxx b/src/EditView.cxx index c81733258..c97f2ae87 100644 --- a/src/EditView.cxx +++ b/src/EditView.cxx @@ -974,7 +974,7 @@ void EditView::DrawEOL(Surface *surface, const EditModel &model, const ViewStyle  	int alpha = SC_ALPHA_NOALPHA;  	if (!hideSelection) {  		const Sci::Position posAfterLineEnd = model.pdoc->LineStart(line + 1); -		eolInSelection = (lastSubLine == true) ? model.sel.InSelectionForEOL(posAfterLineEnd) : 0; +		eolInSelection = lastSubLine ? model.sel.InSelectionForEOL(posAfterLineEnd) : 0;  		alpha = (eolInSelection == 1) ? vsDraw.selAlpha : vsDraw.selAdditionalAlpha;  	} diff --git a/src/Editor.cxx b/src/Editor.cxx index 8a8bae6cc..671e8a3b0 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -5779,7 +5779,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  			if (wParam == 0)  				return 0;  			char *ptr = CharPtrFromSPtr(lParam); -			unsigned int iChar = 0; +			size_t iChar = 0;  			for (; iChar < wParam - 1; iChar++)  				ptr[iChar] = pdoc->CharAt(iChar);  			ptr[iChar] = '\0'; @@ -5913,7 +5913,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) {  				return selectedText.LengthWithTerminator();  			} else {  				char *ptr = CharPtrFromSPtr(lParam); -				unsigned int iChar = 0; +				size_t iChar = 0;  				if (selectedText.Length()) {  					for (; iChar < selectedText.LengthWithTerminator(); iChar++)  						ptr[iChar] = selectedText.Data()[iChar]; diff --git a/src/PositionCache.cxx b/src/PositionCache.cxx index c5063ca10..b8829a571 100644 --- a/src/PositionCache.cxx +++ b/src/PositionCache.cxx @@ -683,7 +683,7 @@ PositionCacheEntry::PositionCacheEntry(const PositionCacheEntry &other) :  }  void PositionCacheEntry::Set(unsigned int styleNumber_, const char *s_, -	unsigned int len_, XYPOSITION *positions_, unsigned int clock_) { +	unsigned int len_, const XYPOSITION *positions_, unsigned int clock_) {  	Clear();  	styleNumber = styleNumber_;  	len = len_; diff --git a/src/PositionCache.h b/src/PositionCache.h index 1723e0b2f..1f0486415 100644 --- a/src/PositionCache.h +++ b/src/PositionCache.h @@ -192,7 +192,7 @@ public:  	void operator=(const PositionCacheEntry &) = delete;  	void operator=(PositionCacheEntry &&) = delete;  	~PositionCacheEntry(); -	void Set(unsigned int styleNumber_, const char *s_, unsigned int len_, XYPOSITION *positions_, unsigned int clock_); +	void Set(unsigned int styleNumber_, const char *s_, unsigned int len_, const XYPOSITION *positions_, unsigned int clock_);  	void Clear();  	bool Retrieve(unsigned int styleNumber_, const char *s_, unsigned int len_, XYPOSITION *positions_) const;  	static unsigned int Hash(unsigned int styleNumber_, const char *s, unsigned int len_); diff --git a/src/RunStyles.cxx b/src/RunStyles.cxx index 100ca399d..2bcf20892 100644 --- a/src/RunStyles.cxx +++ b/src/RunStyles.cxx @@ -250,7 +250,7 @@ DISTANCE RunStyles<DISTANCE, STYLE>::Runs() const noexcept {  template <typename DISTANCE, typename STYLE>  bool RunStyles<DISTANCE, STYLE>::AllSame() const noexcept { -	for (int run = 1; run < starts->Partitions(); run++) { +	for (DISTANCE run = 1; run < starts->Partitions(); run++) {  		if (styles->ValueAt(run) != styles->ValueAt(run - 1))  			return false;  	} @@ -300,7 +300,7 @@ void RunStyles<DISTANCE, STYLE>::Check() const {  	if (styles->ValueAt(styles->Length()-1) != 0) {  		throw std::runtime_error("RunStyles: Unused style at end changed.");  	} -	for (int j=1; j<styles->Length()-1; j++) { +	for (ptrdiff_t j=1; j<styles->Length()-1; j++) {  		if (styles->ValueAt(j) == styles->ValueAt(j-1)) {  			throw std::runtime_error("RunStyles: Style of a partition same as previous.");  		} diff --git a/src/ViewStyle.cxx b/src/ViewStyle.cxx index d6a34e7ee..ec923c382 100644 --- a/src/ViewStyle.cxx +++ b/src/ViewStyle.cxx @@ -404,7 +404,7 @@ void ViewStyle::ResetDefaultStyle() {  void ViewStyle::ClearStyles() {  	// Reset all styles to be like the default style -	for (unsigned int i=0; i<styles.size(); i++) { +	for (size_t i=0; i<styles.size(); i++) {  		if (i != STYLE_DEFAULT) {  			styles[i].ClearTo(styles[STYLE_DEFAULT]);  		} | 
