PageRenderTime 21ms CodeModel.GetById 14ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/packages/sysutils/par2cmdline/patches/par2cmdline-0.4-gcc4.patch

http://github.com/OpenELEC/OpenELEC.tv
Patch | 62 lines | 49 code | 13 blank | 0 comment | 0 complexity | d52515669d3bc43f19c545fd6405dacc MD5 | raw file
 1Fix compilation with gcc-4.
 2
 3Patch by Dirk-Jan Heijs.
 4
 5http://bugs.gentoo.org/102391
 6http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=287904
 7
 8--- par2cmdline-0.4/reedsolomon.cpp
 9+++ par2cmdline-0.4/reedsolomon.cpp
10@@ -51,7 +51,7 @@
11   }
12 }
13 
14-bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present)
15+template <> bool ReedSolomon<Galois8>::SetInput(const vector<bool> &present)
16 {
17   inputcount = (u32)present.size();
18 
19@@ -80,7 +80,7 @@
20   return true;
21 }
22 
23-bool ReedSolomon<Galois8>::SetInput(u32 count)
24+template <> bool ReedSolomon<Galois8>::SetInput(u32 count)
25 {
26   inputcount = count;
27 
28@@ -101,7 +101,7 @@
29   return true;
30 }
31 
32-bool ReedSolomon<Galois8>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
33+template <> bool ReedSolomon<Galois8>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
34 {
35   // Look up the appropriate element in the RS matrix
36   Galois8 factor = leftmatrix[outputindex * (datapresent + datamissing) + inputindex];
37@@ -189,7 +189,7 @@
38 
39 // Set which of the source files are present and which are missing
40 // and compute the base values to use for the vandermonde matrix.
41-bool ReedSolomon<Galois16>::SetInput(const vector<bool> &present)
42+template <> bool ReedSolomon<Galois16>::SetInput(const vector<bool> &present)
43 {
44   inputcount = (u32)present.size();
45 
46@@ -233,7 +233,7 @@
47 
48 // Record that the specified number of source files are all present
49 // and compute the base values to use for the vandermonde matrix.
50-bool ReedSolomon<Galois16>::SetInput(u32 count)
51+template <> bool ReedSolomon<Galois16>::SetInput(u32 count)
52 {
53   inputcount = count;
54 
55@@ -267,7 +267,7 @@
56   return true;
57 }
58 
59-bool ReedSolomon<Galois16>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
60+template <> bool ReedSolomon<Galois16>::Process(size_t size, u32 inputindex, const void *inputbuffer, u32 outputindex, void *outputbuffer)
61 {
62   // Look up the appropriate element in the RS matrix