Permalink
Browse files

Fixed a number of compiler warnings.

  • Loading branch information...
1 parent b9d6891 commit cdb998ab0e7d1c992bfd61ba77dbea6b14176ed2 @ajpalkovic ajpalkovic committed Jun 27, 2010
View
0 src/EditorBundlePanel.cpp 100644 → 100755
No changes.
View
0 src/EditorBundlePanel.h 100644 → 100755
No changes.
View
0 src/EditorChangeState.h 100644 → 100755
No changes.
View
@@ -1396,7 +1396,7 @@ void EditorCtrl::GetTextPart(unsigned int start, unsigned int end, vector<char>&
cxENDLOCK
}
-int GetTabWidthInSpaces(wxString& text, int tabWidth) {
+int GetTabWidthInSpaces(wxString text, int tabWidth) {
int length = 0;
for(unsigned int c = 0; c < text.length(); c++) {
if(text[c] == ' ') {
@@ -4335,7 +4335,7 @@ const deque<const wxString*> EditorCtrl::GetScope() {
void EditorCtrl::OnMarkCopy() {
unsigned int pos = GetPos();
- if(m_markCopyStart >= 0 && m_markCopyStart <= m_lines.GetLength()) {
+ if(m_markCopyStart >= 0 && (unsigned int)m_markCopyStart <= m_lines.GetLength()) {
RemoveAllSelections();
Select(m_markCopyStart, pos);
OnCopy();
View
@@ -565,7 +565,7 @@ class EditorCtrl : public KeyHookable<wxControl>,
mutable int m_options_cache; // for compiled regex
mutable pcre *m_re; // for last compiled regex
mutable unsigned int m_symbolCacheToken;
- unsigned int m_markCopyStart;
+ int m_markCopyStart;
// Above: set in constructors' intializer list
// ----
View
0 src/EditorFrame.cpp 100644 → 100755
No changes.
View
0 src/EditorFrame.h 100644 → 100755
No changes.
View
0 src/EditorPrintout.cpp 100644 → 100755
No changes.
View
0 src/EditorPrintout.h 100644 → 100755
No changes.
View
2 src/RedoDlg.cpp 100644 → 100755
@@ -16,7 +16,7 @@
#include "EditorCtrl.h"
#include "EditorFrame.h"
-RedoDlg::RedoDlg(EditorCtrl* parent, EditorFrame* frame, CatalystWrapper& cw, int editorId, const doc_id& di)
+RedoDlg::RedoDlg(EditorCtrl* parent, EditorFrame* frame, CatalystWrapper& cw, int WXUNUSED(editorId), const doc_id& di)
: wxDialog (parent, -1, _("Undo History"), wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER) {
UndoHistory* undoHistory = new UndoHistory(cw, frame, frame->GetId(), this, wxID_ANY, wxDefaultPosition, wxDefaultSize);
undoHistory->SetEditorCtrl(parent);
View
@@ -111,7 +111,7 @@ void SymbolList::OnIdle(wxIdleEvent& WXUNUSED(event)) {
wxLogDebug(wxT("Doing Search"));
for (vector<SymbolRef>::const_iterator p = m_symbols.begin(); p != m_symbols.end(); ++p) {
const SymbolRef& sr = *p;
- wxString& symbol = m_editorSymbols->GetSymbolString(sr);
+ wxString symbol = m_editorSymbols->GetSymbolString(sr);
std::vector<char> symbolVector;
for(unsigned int c = 0; c < symbol.Len(); c++) {
symbolVector.push_back(symbol[c]);
@@ -214,13 +214,13 @@ bool Styler_HtmlHL::IsValidTag(unsigned int start, unsigned int end, const Docum
return false;
}
-bool Styler_HtmlHL::IsOpenComment(const Document& doc, int bracket) {
+bool Styler_HtmlHL::IsOpenComment(const Document& doc, unsigned int bracket) {
//<!--
if(bracket+3 >= doc.GetLength()) return false;
return doc.GetChar(bracket+1) == '!' && doc.GetChar(bracket+2) == '-' && doc.GetChar(bracket+3) == '-';
}
-bool Styler_HtmlHL::IsCloseComment(const Document& doc, int bracket) {
+bool Styler_HtmlHL::IsCloseComment(const Document& doc, unsigned int bracket) {
//-->
if(bracket-2 < 0) return false;
return doc.GetChar(bracket-1) == '-' && doc.GetChar(bracket-2) == '-';
@@ -332,12 +332,12 @@ bool Styler_HtmlHL::SameTag(TagInterval& openTag, TagInterval& closeTag, const D
//we are guaranteed openIndex and closeIndex are less than the doc length because there must be a closing bracket in the tag to get in here
start = doc.GetChar(openIndex);
if(start >= 'A' && start <= 'Z') {
- start -= ('A' - 'a');
+ start -= (wxChar)('A' - 'a');
}
end = doc.GetChar(closeIndex);
if(end >= 'A' && end <= 'Z') {
- end -= ('A' - 'a');
+ end -= (wxChar)('A' - 'a');
}
//once we hit non-alphanumber characters, then the tags have not differred so far, so it is valid
View
4 src/styler_htmlhl.h 100644 → 100755
@@ -59,8 +59,8 @@ class Styler_HtmlHL : public Styler {
bool SameTag(TagInterval& openTag, TagInterval& closeTag, const Document& doc);
bool FindBrackets(unsigned int start, unsigned int end, const Document& doc);
void FindAllBrackets(const Document& doc);
- bool IsOpenComment(const Document& doc, int bracket);
- bool IsCloseComment(const Document& doc, int bracket);
+ bool IsOpenComment(const Document& doc, unsigned int bracket);
+ bool IsCloseComment(const Document& doc, unsigned int bracket);
void FindTags(const Document& doc);
int FindMatchingTag(const Document& doc, int tag);
int FindCurrentTag();
@@ -46,7 +46,7 @@ void Styler_Selections::NextSelection() {
if(!m_enabled) return;
m_nextSelection++;
- if(m_nextSelection >= m_selections.size()) {
+ if((unsigned int)m_nextSelection >= m_selections.size()) {
m_nextSelection = 0;
}
@@ -155,7 +155,7 @@ void Styler_Selections::Delete(unsigned int start_pos, unsigned int end_pos) {
m_selections[c].end -= length;
} else {
//deleted text in some way encompasses teh whole selection, so ditch it
- if(c <= m_nextSelection) {
+ if(c <= (unsigned int)m_nextSelection) {
m_nextSelection--;
}
m_selections.erase(m_selections.begin()+c);
@@ -142,7 +142,6 @@ void Styler_VariableHL::Insert(unsigned int pos, unsigned int length) {
}
//We can't call GetPos because it hasn't been updated yet.
- unsigned int end = pos+length;
if(m_cursorPosition >= pos) {
m_cursorPosition += length;
}

0 comments on commit cdb998a

Please sign in to comment.