Solves linter warnings relating to type and scope

This commit is contained in:
sloumdrone 2020-01-08 19:24:49 -08:00
parent 53a74a964a
commit f3f18eb712
2 changed files with 10 additions and 10 deletions

View File

@ -16,11 +16,11 @@ static const int use_alternate_screen = 1; // use as bool (0 or 1)
* Values from 1 to 256 representing 256 color/8-bit pallate
* see: https://en.wikipedia.org/wiki/ANSI_escape_code#8-bit
*/
static const unsigned int EDITOR_BG_COLOR = 235;
static const unsigned int VISUAL_BG_COLOR = 69;
static const unsigned int HL_NUMBER_COLOR = 207;
static const unsigned int HL_STRING_COLOR = 116;
static const unsigned int HL_COMMENT_COLOR = 243;
static const unsigned int HL_KEYWORD1_COLOR = 69;
static const unsigned int HL_KEYWORD2_COLOR = 167;
static const unsigned int HL_DEFAULT_COLOR = 229;
static const int EDITOR_BG_COLOR = 235;
static const int VISUAL_BG_COLOR = 69;
static const int HL_NUMBER_COLOR = 207;
static const int HL_STRING_COLOR = 116;
static const int HL_COMMENT_COLOR = 243;
static const int HL_KEYWORD1_COLOR = 69;
static const int HL_KEYWORD2_COLOR = 167;
static const int HL_DEFAULT_COLOR = 229;

View File

@ -353,7 +353,7 @@ void editorUpdateSyntax(erow *row) {
editorUpdateSyntax(&E.row[row->idx + 1]);
}
unsigned int editorSyntaxToColor(int hl) {
int editorSyntaxToColor(int hl) {
switch (hl) {
case HL_NUMBER: return HL_NUMBER_COLOR;
case HL_STRING: return HL_STRING_COLOR;
@ -938,8 +938,8 @@ void editorEndOfWord() {
}
void editorCopyRange(int sx, int sy, int ex, int ey) {
int swap;
if (ey < sy || (sy == ey && ex < sx)) {
int swap;
swap = sy; sy = ey; ey = swap;
swap = sx; sx = ex; ex = swap;
}