mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-26 23:34:44 +02:00
Fix the warnings issue during Scintilla's compiling
Remove std::iterator from Boost Regex search code: std::iterator was deprecated in C++17. Remove it to fix the warnings and avoid other issues. Fix #10035, close #10036
This commit is contained in:
parent
4642be5492
commit
2794c927b3
@ -1,13 +1,35 @@
|
|||||||
#ifndef ANSIDOCUMENTITERATOR_H_12481491281240
|
// This file is part of Notepad++ project
|
||||||
|
// Copyright (C) 2021 Notepad++ authors.
|
||||||
|
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// at your option any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#ifndef ANSIDOCUMENTITERATOR_H_12481491281240
|
||||||
#define ANSIDOCUMENTITERATOR_H_12481491281240
|
#define ANSIDOCUMENTITERATOR_H_12481491281240
|
||||||
|
|
||||||
#include "Position.h"
|
#include "Position.h"
|
||||||
|
|
||||||
namespace Scintilla {
|
namespace Scintilla {
|
||||||
|
|
||||||
class AnsiDocumentIterator : public std::iterator<std::bidirectional_iterator_tag, char>
|
class AnsiDocumentIterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
using iterator_category = std::bidirectional_iterator_tag;
|
||||||
|
using value_type = char;
|
||||||
|
using difference_type = ptrdiff_t;
|
||||||
|
using pointer = char*;
|
||||||
|
using reference = char&;
|
||||||
|
|
||||||
AnsiDocumentIterator() {};
|
AnsiDocumentIterator() {};
|
||||||
|
|
||||||
AnsiDocumentIterator(Document* doc, Sci::Position pos, Sci::Position end) :
|
AnsiDocumentIterator(Document* doc, Sci::Position pos, Sci::Position end) :
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <iterator>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
@ -1,6 +1,20 @@
|
|||||||
#include "UTF8DocumentIterator.h"
|
// This file is part of Notepad++ project
|
||||||
|
// Copyright (C) 2021 Notepad++ authors.
|
||||||
|
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// at your option any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#include "UTF8DocumentIterator.h"
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
@ -9,8 +23,6 @@
|
|||||||
#include "Scintilla.h"
|
#include "Scintilla.h"
|
||||||
#include "Platform.h"
|
#include "Platform.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "CharacterCategory.h"
|
#include "CharacterCategory.h"
|
||||||
#include "Position.h"
|
#include "Position.h"
|
||||||
#include "SplitVector.h"
|
#include "SplitVector.h"
|
||||||
|
@ -1,8 +1,23 @@
|
|||||||
#ifndef UTF8DOCUMENTITERATOR_H_3452843291318441149
|
// This file is part of Notepad++ project
|
||||||
|
// Copyright (C) 2021 Notepad++ authors.
|
||||||
|
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, either version 3 of the License, or
|
||||||
|
// at your option any later version.
|
||||||
|
//
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License for more details.
|
||||||
|
//
|
||||||
|
// You should have received a copy of the GNU General Public License
|
||||||
|
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
#ifndef UTF8DOCUMENTITERATOR_H_3452843291318441149
|
||||||
#define UTF8DOCUMENTITERATOR_H_3452843291318441149
|
#define UTF8DOCUMENTITERATOR_H_3452843291318441149
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <iterator>
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include "Position.h"
|
#include "Position.h"
|
||||||
@ -11,9 +26,15 @@ namespace Scintilla {
|
|||||||
|
|
||||||
class Document;
|
class Document;
|
||||||
|
|
||||||
class UTF8DocumentIterator : public std::iterator<std::bidirectional_iterator_tag, wchar_t>
|
class UTF8DocumentIterator
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
using iterator_category = std::bidirectional_iterator_tag;
|
||||||
|
using value_type = wchar_t;
|
||||||
|
using difference_type = ptrdiff_t;
|
||||||
|
using pointer = wchar_t*;
|
||||||
|
using reference = wchar_t&;
|
||||||
|
|
||||||
UTF8DocumentIterator() {};
|
UTF8DocumentIterator() {};
|
||||||
|
|
||||||
UTF8DocumentIterator(Document* doc, Sci::Position pos, Sci::Position end);
|
UTF8DocumentIterator(Document* doc, Sci::Position pos, Sci::Position end);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user