diff options
author | Neil <nyamatongwe@gmail.com> | 2013-09-10 14:44:16 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2013-09-10 14:44:16 +1000 |
commit | a1edd2b133bf3ae4d263cea2f46aacb4b51fccb5 (patch) | |
tree | 95cd567b68fc22493443eedd8b9e86739551d07a /src | |
parent | 790cde271408e20b2ffbbe53670e860582df29e4 (diff) | |
download | scintilla-mirror-a1edd2b133bf3ae4d263cea2f46aacb4b51fccb5.tar.gz |
Use C++ struct initialization {} so can drop -Wno-missing-braces setting for gcc.
Diffstat (limited to 'src')
-rw-r--r-- | src/Editor.cxx | 34 | ||||
-rw-r--r-- | src/ScintillaBase.cxx | 8 |
2 files changed, 21 insertions, 21 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index afc2983ed..306e375b1 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -4416,7 +4416,7 @@ void Editor::SetCtrlID(int identifier) { } void Editor::NotifyStyleToNeeded(int endStyleNeeded) { - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_STYLENEEDED; scn.position = endStyleNeeded; NotifyParent(scn); @@ -4434,14 +4434,14 @@ void Editor::NotifyErrorOccurred(Document *, void *, int status) { } void Editor::NotifyChar(int ch) { - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_CHARADDED; scn.ch = ch; NotifyParent(scn); } void Editor::NotifySavePoint(bool isSavePoint) { - SCNotification scn = {0}; + SCNotification scn = {}; if (isSavePoint) { scn.nmhdr.code = SCN_SAVEPOINTREACHED; } else { @@ -4451,13 +4451,13 @@ void Editor::NotifySavePoint(bool isSavePoint) { } void Editor::NotifyModifyAttempt() { - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_MODIFYATTEMPTRO; NotifyParent(scn); } void Editor::NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt) { - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_DOUBLECLICK; scn.line = LineFromLocation(pt); scn.position = PositionFromLocation(pt, true); @@ -4467,7 +4467,7 @@ void Editor::NotifyDoubleClick(Point pt, bool shift, bool ctrl, bool alt) { } void Editor::NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, bool alt) { - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_HOTSPOTDOUBLECLICK; scn.position = position; scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | @@ -4476,7 +4476,7 @@ void Editor::NotifyHotSpotDoubleClicked(int position, bool shift, bool ctrl, boo } void Editor::NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt) { - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_HOTSPOTCLICK; scn.position = position; scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | @@ -4485,7 +4485,7 @@ void Editor::NotifyHotSpotClicked(int position, bool shift, bool ctrl, bool alt) } void Editor::NotifyHotSpotReleaseClick(int position, bool shift, bool ctrl, bool alt) { - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_HOTSPOTRELEASECLICK; scn.position = position; scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | @@ -4495,7 +4495,7 @@ void Editor::NotifyHotSpotReleaseClick(int position, bool shift, bool ctrl, bool bool Editor::NotifyUpdateUI() { if (needUpdateUI) { - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_UPDATEUI; scn.updated = needUpdateUI; NotifyParent(scn); @@ -4506,7 +4506,7 @@ bool Editor::NotifyUpdateUI() { } void Editor::NotifyPainted() { - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_PAINTED; NotifyParent(scn); } @@ -4514,7 +4514,7 @@ void Editor::NotifyPainted() { void Editor::NotifyIndicatorClick(bool click, int position, bool shift, bool ctrl, bool alt) { int mask = pdoc->decorations.AllOnFor(position); if ((click && mask) || pdoc->decorations.clickNotified) { - SCNotification scn = {0}; + SCNotification scn = {}; pdoc->decorations.clickNotified = click; scn.nmhdr.code = click ? SCN_INDICATORCLICK : SCN_INDICATORRELEASE; scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | (alt ? SCI_ALT : 0); @@ -4553,7 +4553,7 @@ bool Editor::NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt) { } return true; } - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_MARGINCLICK; scn.modifiers = (shift ? SCI_SHIFT : 0) | (ctrl ? SCI_CTRL : 0) | (alt ? SCI_ALT : 0); @@ -4567,7 +4567,7 @@ bool Editor::NotifyMarginClick(Point pt, bool shift, bool ctrl, bool alt) { } void Editor::NotifyNeedShown(int pos, int len) { - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_NEEDSHOWN; scn.position = pos; scn.length = len; @@ -4575,7 +4575,7 @@ void Editor::NotifyNeedShown(int pos, int len) { } void Editor::NotifyDwelling(Point pt, bool state) { - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = state ? SCN_DWELLSTART : SCN_DWELLEND; scn.position = PositionFromLocation(pt, true); scn.x = pt.x + vs.ExternalMarginWidth(); @@ -4584,7 +4584,7 @@ void Editor::NotifyDwelling(Point pt, bool state) { } void Editor::NotifyZoom() { - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_ZOOM; NotifyParent(scn); } @@ -4776,7 +4776,7 @@ void Editor::NotifyModified(Document *, DocModification mh, void *) { NotifyChange(); // Send EN_CHANGE } - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_MODIFIED; scn.position = mh.position; scn.modificationType = mh.modificationType; @@ -4918,7 +4918,7 @@ void Editor::NotifyMacroRecord(unsigned int iMessage, uptr_t wParam, sptr_t lPar } // Send notification - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_MACRORECORD; scn.message = iMessage; scn.wParam = wParam; diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index 75f0d5a16..b06f72836 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -289,7 +289,7 @@ void ScintillaBase::AutoCompleteStart(int lenEntered, const char *list) { void ScintillaBase::AutoCompleteCancel() { if (ac.Active()) { - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_AUTOCCANCELLED; scn.wParam = 0; scn.listType = 0; @@ -325,7 +325,7 @@ void ScintillaBase::AutoCompleteCharacterDeleted() { } else { AutoCompleteMoveToCurrentWord(); } - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_AUTOCCHARDELETED; scn.wParam = 0; scn.listType = 0; @@ -342,7 +342,7 @@ void ScintillaBase::AutoCompleteCompleted() { ac.Show(false); - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = listType > 0 ? SCN_USERLISTSELECTION : SCN_AUTOCSELECTION; scn.message = 0; scn.wParam = listType; @@ -434,7 +434,7 @@ void ScintillaBase::CallTipShow(Point pt, const char *defn) { } void ScintillaBase::CallTipClick() { - SCNotification scn = {0}; + SCNotification scn = {}; scn.nmhdr.code = SCN_CALLTIPCLICK; scn.position = ct.clickPlace; NotifyParent(scn); |