Scintilla: Fixed Linux build.
This commit is contained in:
Родитель
c7ea0a6a97
Коммит
a7b6d06cd4
|
@ -65,7 +65,7 @@
|
|||
#undef PLAT_MACOSX
|
||||
#define PLAT_MACOSX 1
|
||||
|
||||
#else
|
||||
#if defined(__WIN32__) || defined(_WIN32) || defined(_WIN64)
|
||||
#undef PLAT_WIN
|
||||
#define PLAT_WIN 1
|
||||
|
||||
|
@ -526,8 +526,14 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && defined(SCINTILLA_QT)
|
||||
#if defined(__GNUC__)
|
||||
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"
|
||||
#endif
|
||||
|
||||
#if defined(__EXCEPTIONS)
|
||||
#else
|
||||
# define try if (1)
|
||||
# define catch(...) else if (0)
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -24,6 +24,8 @@
|
|||
#include "LexerBase.h"
|
||||
#include "LexerNoExceptions.h"
|
||||
|
||||
#include "Platform.h"
|
||||
|
||||
#ifdef SCI_NAMESPACE
|
||||
using namespace Scintilla;
|
||||
#endif
|
||||
|
|
|
@ -787,10 +787,12 @@ const Action &CellBuffer::GetUndoStep() const {
|
|||
void CellBuffer::PerformUndoStep() {
|
||||
const Action &actionStep = uh.GetUndoStep();
|
||||
if (actionStep.at == insertAction) {
|
||||
#if defined(__EXCEPTIONS)
|
||||
if (substance.Length() < actionStep.lenData) {
|
||||
throw std::runtime_error(
|
||||
"CellBuffer::PerformUndoStep: deletion must be less than document length.");
|
||||
}
|
||||
#endif // defined(__EXCEPTIONS)
|
||||
BasicDeleteChars(actionStep.position, actionStep.lenData);
|
||||
} else if (actionStep.at == removeAction) {
|
||||
BasicInsertString(actionStep.position, actionStep.data, actionStep.lenData);
|
||||
|
|
|
@ -260,6 +260,7 @@ int RunStyles::Find(int value, int start) const {
|
|||
}
|
||||
|
||||
void RunStyles::Check() const {
|
||||
#if defined(__EXCEPTIONS)
|
||||
if (Length() < 0) {
|
||||
throw std::runtime_error("RunStyles: Length can not be negative.");
|
||||
}
|
||||
|
@ -285,4 +286,5 @@ void RunStyles::Check() const {
|
|||
throw std::runtime_error("RunStyles: Style of a partition same as previous.");
|
||||
}
|
||||
}
|
||||
#endif // defined(__EXCEPTIONS)
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче