summaryrefslogtreecommitdiff
path: root/libre-multilib/pcsx2/0001-common-fix-gcc-5.0-issue.patch
blob: 706fd722c66a379946fc76721c292406898d641e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
From 87bcb465c6c2238137dbf99890e9032930a5f6cd Mon Sep 17 00:00:00 2001
From: Gregory Hainaut <gregory.hainaut@gmail.com>
Date: Wed, 27 May 2015 18:20:06 +0200
Subject: [PATCH] common: fix gcc 5.0 issue

Don't use const for variable object

Close issue #560
---
 common/include/Utilities/Console.h |  8 ++++----
 common/src/Utilities/Console.cpp   | 14 +++++++-------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/common/include/Utilities/Console.h b/common/include/Utilities/Console.h
index a4fb75f..3cec159 100644
--- a/common/include/Utilities/Console.h
+++ b/common/include/Utilities/Console.h
@@ -236,7 +236,7 @@ public:
 	virtual ~ConsoleAttrScope() throw();
 };
 
-extern const IConsoleWriter	Console;
+extern IConsoleWriter	Console;
 
 extern void Console_SetActiveHandler( const IConsoleWriter& writer, FILE* flushfp=NULL );
 extern const wxString& ConsoleBuffer_Get();
@@ -249,9 +249,9 @@ extern const IConsoleWriter		ConsoleWriter_Assert;
 extern const IConsoleWriter		ConsoleWriter_Buffered;
 extern const IConsoleWriter		ConsoleWriter_wxError;
 
-extern const NullConsoleWriter	NullCon;
+extern NullConsoleWriter	NullCon;
 
-extern const IConsoleWriter		DevConWriter;
+extern IConsoleWriter			DevConWriter;
 extern bool						DevConWriterEnabled;
 
 #ifdef PCSX2_DEVBUILD
@@ -261,7 +261,7 @@ extern bool						DevConWriterEnabled;
 #endif
 
 #ifdef PCSX2_DEBUG
-extern const IConsoleWriter		DbgConWriter;
+extern IConsoleWriter		DbgConWriter;
 #	define DbgCon				DbgConWriter
 #else
 #	define DbgCon				0&&NullCon
diff --git a/common/src/Utilities/Console.cpp b/common/src/Utilities/Console.cpp
index 956a295..3ff0469 100644
--- a/common/src/Utilities/Console.cpp
+++ b/common/src/Utilities/Console.cpp
@@ -55,11 +55,11 @@ void Console_SetActiveHandler( const IConsoleWriter& writer, FILE* flushfp )
 			writer.DoWriteLn( ConsoleBuffer_Get() );
 	}
 
-	const_cast<IConsoleWriter&>(Console)		= writer;
-	const_cast<IConsoleWriter&>(DevConWriter)	= writer;
+	Console			= writer;
+	DevConWriter	= writer;
 
 #ifdef PCSX2_DEBUG
-	const_cast<IConsoleWriter&>(DbgCon)	= writer;
+	DbgCon	= writer;
 #endif
 }
 
@@ -597,15 +597,15 @@ ConsoleAttrScope::~ConsoleAttrScope() throw()
 // 
 #define _DefaultWriter_	ConsoleWriter_Stdout
 
-const IConsoleWriter	Console				= _DefaultWriter_;
-const IConsoleWriter	DevConWriter		= _DefaultWriter_;
+IConsoleWriter	Console				= _DefaultWriter_;
+IConsoleWriter	DevConWriter		= _DefaultWriter_;
 bool					DevConWriterEnabled	= false;
 
 #ifdef PCSX2_DEBUG
-const IConsoleWriter	DbgConWriter		= _DefaultWriter_;
+IConsoleWriter	DbgConWriter		= _DefaultWriter_;
 #endif
 
-const NullConsoleWriter	NullCon = {};
+NullConsoleWriter	NullCon = {};
 
 // --------------------------------------------------------------------------------------
 //  ConsoleLogSource  (implementations)
-- 
2.5.3