mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 826983 - Enable FAIL_ON_WARNINGS on MSVC in editor/. r=ehsan
This commit is contained in:
parent
7adf3271d1
commit
238cc58022
@ -16,9 +16,7 @@ EXPORT_LIBRARY = 1
|
||||
IS_COMPONENT = 1
|
||||
MODULE_NAME = nsComposerModule
|
||||
LIBXUL_LIBRARY = 1
|
||||
ifndef _MSC_VER
|
||||
FAIL_ON_WARNINGS = 1
|
||||
endif # !_MSC_VER
|
||||
|
||||
|
||||
CPPSRCS = \
|
||||
|
@ -247,12 +247,12 @@ void nsComposerCommandsUpdater::TimerCallback()
|
||||
{
|
||||
// if the selection state has changed, update stuff
|
||||
bool isCollapsed = SelectionIsCollapsed();
|
||||
if (isCollapsed != mSelectionCollapsed)
|
||||
if (static_cast<int8_t>(isCollapsed) != mSelectionCollapsed)
|
||||
{
|
||||
UpdateCommandGroup(NS_LITERAL_STRING("select"));
|
||||
mSelectionCollapsed = isCollapsed;
|
||||
}
|
||||
|
||||
|
||||
// isn't this redundant with the UpdateCommandGroup above?
|
||||
// can we just nuke the above call? or create a meta command group?
|
||||
UpdateCommandGroup(NS_LITERAL_STRING("style"));
|
||||
@ -261,14 +261,14 @@ void nsComposerCommandsUpdater::TimerCallback()
|
||||
nsresult
|
||||
nsComposerCommandsUpdater::UpdateDirtyState(bool aNowDirty)
|
||||
{
|
||||
if (mDirtyState != aNowDirty)
|
||||
if (mDirtyState != static_cast<int8_t>(aNowDirty))
|
||||
{
|
||||
UpdateCommandGroup(NS_LITERAL_STRING("save"));
|
||||
UpdateCommandGroup(NS_LITERAL_STRING("undo"));
|
||||
mDirtyState = aNowDirty;
|
||||
}
|
||||
|
||||
return NS_OK;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -15,9 +15,7 @@ TEST_DIRS += tests
|
||||
MODULE = editor
|
||||
LIBRARY_NAME = editorbase_s
|
||||
LIBXUL_LIBRARY = 1
|
||||
ifndef _MSC_VER
|
||||
FAIL_ON_WARNINGS = 1
|
||||
endif # !_MSC_VER
|
||||
|
||||
|
||||
# Internal header files, needed by other editor sublibs:
|
||||
|
@ -2606,18 +2606,18 @@ nsEditor::NotifyDocumentListeners(TDocumentListenerNotification aNotificationTyp
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case eDocumentStateChanged:
|
||||
{
|
||||
bool docIsDirty;
|
||||
rv = GetDocumentModified(&docIsDirty);
|
||||
NS_ENSURE_SUCCESS(rv, rv);
|
||||
|
||||
if (docIsDirty == mDocDirtyState)
|
||||
|
||||
if (static_cast<int8_t>(docIsDirty) == mDocDirtyState)
|
||||
return NS_OK;
|
||||
|
||||
mDocDirtyState = (int8_t)docIsDirty;
|
||||
|
||||
|
||||
mDocDirtyState = docIsDirty;
|
||||
|
||||
for (i = 0; i < numListeners;i++)
|
||||
{
|
||||
rv = listeners[i]->NotifyDocumentStateChanged(mDocDirtyState);
|
||||
|
Loading…
Reference in New Issue
Block a user