Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix some compile warnings

  • Loading branch information...
commit 9caa5b7ddef1b93dfa78307ed1cb286be87a512b 1 parent a86b1d8
@tea tea authored
View
4 src/DiffBar.cpp
@@ -299,7 +299,7 @@ void DiffBar::OnMouseMotion(wxMouseEvent& evt) {
const unsigned int rightBracket = size.x - s_bracketWidth;
int highlight = -1;
- if (mpos.x <= s_bracketWidth) {
+ if (mpos.x <= (int)s_bracketWidth) {
std::vector<LineMatch>::const_iterator p = OnLeftBracket(mpos.y);
if( p != m_lineMatches.end()) highlight = p->left_start;
}
@@ -318,7 +318,7 @@ void DiffBar::OnMouseLeftUp(wxMouseEvent& evt) {
const wxSize size = GetClientSize();
const wxPoint mpos = evt.GetPosition();
- if (mpos.x <= s_bracketWidth) {
+ if (mpos.x <= (int)s_bracketWidth) {
// Have we clicked a bracket?
std::vector<LineMatch>::const_iterator p = OnLeftBracket(mpos.y);
if (p == m_lineMatches.end()) return;
View
2  src/EditorCtrl.cpp
@@ -332,7 +332,7 @@ void EditorCtrl::RestoreSettings(unsigned int page_id, eFrameSettings& settings,
vector<unsigned int> bookmarks;
// Retrieve the page info
- wxASSERT(0 <= page_id && page_id < (int)settings.GetPageCount());
+ wxASSERT(0 <= page_id && page_id < settings.GetPageCount());
settings.GetPageSettings(page_id, mirrorPath, di, newpos, topline, syntax, folds, bookmarks, (SubPage)subid);
if (eDocumentPath::IsRemotePath(mirrorPath)) {
View
2  src/FixedLine.cpp
@@ -33,10 +33,10 @@ FixedLine::FixedLine(wxDC& dc, const DocumentWrapper& dw, const vector<interval>
m_tabChars(4),
lastpos(lastpos),
m_isSelShadow(isShadow),
- selections(sel),
m_brackets(brackets),
m_theme(theme),
m_sr(m_theme, (FastDC&)dc),
+ selections(sel),
m_wrapMode(cxWRAP_NONE),
m_showIndent(false),
m_indentWidth(0),
View
4 src/GotoFileDlg.cpp
@@ -44,8 +44,8 @@ class DirState {
}
DirState(const wxString& path):
- walkingFiles(false),
- prefix(path + wxFILE_SEP_PATH)
+ prefix(path + wxFILE_SEP_PATH),
+ walkingFiles(false)
{
dir.Open(path);
}
View
2  src/ProjectPane.cpp
@@ -1232,7 +1232,9 @@ void ProjectPane::OnTreeContextMenu(wxTreeEvent& event) {
wxTreeItemId item = event.GetItem();
if (!item) return;
+#ifdef __WXMSW__
bool showExtendedItems = wxGetKeyState(WXK_SHIFT);
+#endif
// Get the path of the item clicked
const DirItemData *data = (DirItemData*)m_prjTree->GetItemData(item);
View
24 src/ProjectSettings.cpp
@@ -100,16 +100,16 @@ ProjectSettings::ProjectSettings(wxWindow* parent, const cxProjectInfo& project,
}
if (projectToLoad) {
- const wxString ind = wxJoin(projectToLoad->includeDirs, wxT('\n'), NULL);
+ const wxString ind = wxJoin(projectToLoad->includeDirs, wxT('\n'), wxT('\0'));
m_includeDirs->SetValue(ind);
- const wxString inf = wxJoin(projectToLoad->includeFiles, wxT('\n'), NULL);
+ const wxString inf = wxJoin(projectToLoad->includeFiles, wxT('\n'), wxT('\0'));
m_includeFiles->SetValue(inf);
- const wxString exd = wxJoin(projectToLoad->excludeDirs, wxT('\n'), NULL);
+ const wxString exd = wxJoin(projectToLoad->excludeDirs, wxT('\n'), wxT('\0'));
m_excludeDirs->SetValue(exd);
- const wxString exf = wxJoin(projectToLoad->excludeFiles, wxT('\n'), NULL);
+ const wxString exf = wxJoin(projectToLoad->excludeFiles, wxT('\n'), wxT('\0'));
m_excludeFiles->SetValue(exf);
}
@@ -142,10 +142,10 @@ void ProjectSettings::GetSettings(cxProjectInfo& project) const {
project.ClearFilters();
if (!m_inheritCheck->GetValue()) {
- const wxArrayString ind = wxSplit(m_includeDirs->GetValue(), wxT('\n'), NULL);
- const wxArrayString exd = wxSplit(m_excludeDirs->GetValue(), wxT('\n'), NULL);
- const wxArrayString inf = wxSplit(m_includeFiles->GetValue(), wxT('\n'), NULL);
- const wxArrayString exf = wxSplit(m_excludeFiles->GetValue(), wxT('\n'), NULL);
+ const wxArrayString ind = wxSplit(m_includeDirs->GetValue(), wxT('\n'), wxT('\0'));
+ const wxArrayString exd = wxSplit(m_excludeDirs->GetValue(), wxT('\n'), wxT('\0'));
+ const wxArrayString inf = wxSplit(m_includeFiles->GetValue(), wxT('\n'), wxT('\0'));
+ const wxArrayString exf = wxSplit(m_excludeFiles->GetValue(), wxT('\n'), wxT('\0'));
project.SetFilters(ind, exd, inf, exf);
}
@@ -158,16 +158,16 @@ void ProjectSettings::GetSettings(cxProjectInfo& project) const {
void ProjectSettings::OnInheritCheck(wxCommandEvent& event) {
if (event.IsChecked()) {
- const wxString ind = wxJoin(m_parentProject.includeDirs, wxT('\n'), NULL);
+ const wxString ind = wxJoin(m_parentProject.includeDirs, wxT('\n'), wxT('\0'));
m_includeDirs->SetValue(ind);
- const wxString inf = wxJoin(m_parentProject.includeFiles, wxT('\n'), NULL);
+ const wxString inf = wxJoin(m_parentProject.includeFiles, wxT('\n'), wxT('\0'));
m_includeFiles->SetValue(inf);
- const wxString exd = wxJoin(m_parentProject.excludeDirs, wxT('\n'), NULL);
+ const wxString exd = wxJoin(m_parentProject.excludeDirs, wxT('\n'), wxT('\0'));
m_excludeDirs->SetValue(exd);
- const wxString exf = wxJoin(m_parentProject.excludeFiles, wxT('\n'), NULL);
+ const wxString exf = wxJoin(m_parentProject.excludeFiles, wxT('\n'), wxT('\0'));
m_excludeFiles->SetValue(exf);
View
2  src/eDocumentPath.cpp
@@ -41,7 +41,7 @@ FILE_PERMISSIONS eDocumentPath::GetPermissions(const wxString& path) {
#else
// Get protection
struct stat s;
- int res = stat(path.mb_str(wxConvUTF8), &s);
+ stat(path.mb_str(wxConvUTF8), &s);
return s.st_mode;
#endif
}
View
5 src/plistHandler.cpp
@@ -224,13 +224,14 @@ PListHandler::PListHandler(const wxString& appPath, const wxString& appDataPath,
m_localBundleDir.AppendDir(wxT("Bundles"));
#ifdef __WXDEBUG__
- wxStartTimer();
+ wxStopWatch perftimer;
+ perftimer.Start();
#endif
Update(UPDATE_SYNTAXONLY);
#ifdef __WXDEBUG__
- wxLogDebug(wxT("Bundle Update Time: %d"), wxGetElapsedTime());
+ wxLogDebug(wxT("Bundle Update Time: %ld"), perftimer.Time());
#endif
}
Please sign in to comment.
Something went wrong with that request. Please try again.