Skip to content

Commit cc6cf9b

Browse files
committed
patch 7.4.1610
Problem: Compiler warnings for non-virtual destructor. Solution: Mark the classe final. (Ken Takata)
1 parent 4d581a8 commit cc6cf9b

4 files changed

Lines changed: 20 additions & 5 deletions

File tree

src/Make_cyg_ming.mak

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,6 +415,7 @@ WINDRES_CC = $(CC)
415415
###########################################################################
416416

417417
CFLAGS = -Iproto $(DEFINES) -pipe -march=$(ARCH) -Wall
418+
CXXFLAGS = -std=c++11
418419
WINDRES_FLAGS = --preprocessor="$(WINDRES_CC) -E -xc" -DRC_INVOKED
419420
EXTRA_LIBS =
420421

@@ -864,14 +865,14 @@ $(OUTDIR)/gui_w32.o: gui_w32.c $(INCL)
864865
$(CC) -c $(CFLAGS) gui_w32.c -o $(OUTDIR)/gui_w32.o
865866

866867
$(OUTDIR)/gui_dwrite.o: gui_dwrite.cpp $(INCL) gui_dwrite.h
867-
$(CC) -c $(CFLAGS) gui_dwrite.cpp -o $(OUTDIR)/gui_dwrite.o
868+
$(CC) -c $(CFLAGS) $(CXXFLAGS) gui_dwrite.cpp -o $(OUTDIR)/gui_dwrite.o
868869

869870
$(OUTDIR)/if_cscope.o: if_cscope.c $(INCL) if_cscope.h
870871
$(CC) -c $(CFLAGS) if_cscope.c -o $(OUTDIR)/if_cscope.o
871872

872873
# Remove -D__IID_DEFINED__ for newer versions of the w32api
873874
$(OUTDIR)/if_ole.o: if_ole.cpp $(INCL)
874-
$(CC) $(CFLAGS) -c -o $(OUTDIR)/if_ole.o if_ole.cpp
875+
$(CC) $(CFLAGS) $(CXXFLAGS) -c -o $(OUTDIR)/if_ole.o if_ole.cpp
875876

876877
$(OUTDIR)/if_ruby.o: if_ruby.c $(INCL)
877878
ifeq (16, $(RUBY))

src/gui_dwrite.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
# define __out SAL__out
3434
#endif
3535

36+
#if (defined(_MSC_VER) && (_MSC_VER >= 1700)) || (__cplusplus >= 201103L)
37+
# define FINAL final
38+
#else
39+
# define FINAL
40+
#endif
41+
3642
#ifdef DYNAMIC_DIRECTX
3743
extern "C" HINSTANCE vimLoadLib(char *name);
3844

@@ -222,7 +228,7 @@ class AdjustedGlyphRun : public DWRITE_GLYPH_RUN
222228
}
223229
};
224230

225-
class GdiTextRenderer : public IDWriteTextRenderer
231+
class GdiTextRenderer FINAL : public IDWriteTextRenderer
226232
{
227233
public:
228234
GdiTextRenderer(

src/if_ole.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ extern HWND s_hwnd;
3434
extern HWND vim_parent_hwnd;
3535
}
3636

37+
#if (defined(_MSC_VER) && (_MSC_VER >= 1700)) || (__cplusplus >= 201103L)
38+
# define FINAL final
39+
#else
40+
# define FINAL
41+
#endif
42+
3743
#if (defined(_MSC_VER) && _MSC_VER < 1300) || !defined(MAXULONG_PTR)
3844
/* Work around old versions of basetsd.h which wrongly declares
3945
* UINT_PTR as unsigned long */
@@ -93,7 +99,7 @@ static CVim *app = 0;
9399
* ----------
94100
*/
95101

96-
class CVim : public IVim
102+
class CVim FINAL : public IVim
97103
{
98104
public:
99105
virtual ~CVim();
@@ -428,7 +434,7 @@ CVim::Eval(BSTR expr, BSTR *result)
428434
* ----------
429435
*/
430436

431-
class CVimCF : public IClassFactory
437+
class CVimCF FINAL : public IClassFactory
432438
{
433439
public:
434440
static CVimCF *Create();

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ static char *(features[]) =
748748

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1610,
751753
/**/
752754
1609,
753755
/**/

0 commit comments

Comments
 (0)