ubuntuusers.de

Anhang: speech tools.patch

  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
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
diff -upr a/speech_tools/base_class/EST_TSimpleMatrix.cc b/speech_tools/base_class/EST_TSimpleMatrix.cc
--- a/speech_tools/base_class/EST_TSimpleMatrix.cc	2009-02-18 13:56:24.000000000 +0100
+++ b/speech_tools/base_class/EST_TSimpleMatrix.cc	2012-10-27 22:15:54.358619000 +0200
@@ -50,12 +50,12 @@ template<class T>
 void EST_TSimpleMatrix<T>::copy_data(const EST_TSimpleMatrix<T> &a)
 {
     
-  if (!a.p_sub_matrix && !this->p_sub_matrix)
-    memcpy((void *)&this->a_no_check(0,0),
-	   (const void *)&a.a_no_check(0,0),
-	   this->num_rows()*this->num_columns()*sizeof(T)
-	   );
-  else
+//  if (!a.p_sub_matrix && !this->p_sub_matrix)
+//    memcpy((void *)&this->a_no_check(0,0),
+//	   (const void *)&a.a_no_check(0,0),
+//	   this->num_rows()*this->num_columns()*sizeof(T)
+//	   );
+//  else
     {
     for (int i = 0; i < this->num_rows(); ++i)
       for (int j = 0; j < this->num_columns(); ++j)
@@ -98,7 +98,7 @@ void EST_TSimpleMatrix<T>::resize(int ne
 	{
 	  int copy_r = Lof(this->num_rows(), new_rows);
 
-	  just_resize(new_rows, new_cols, &old_vals);
+	  this->just_resize(new_rows, new_cols, &old_vals);
 
           for (q=0; q<(copy_r*new_cols*sizeof(T)); q++) /* memcpy */
               ((char *)this->p_memory)[q] = ((char *)old_vals)[q];
@@ -127,9 +127,9 @@ void EST_TSimpleMatrix<T>::resize(int ne
 	  int copy_r = Lof(this->num_rows(), new_rows);
 	  int copy_c = Lof(this->num_columns(), new_cols);
 	  
-	  just_resize(new_rows, new_cols, &old_vals);
+	  this->just_resize(new_rows, new_cols, &old_vals);
 
-	  set_values(old_vals,
+	  this->set_values(old_vals,
 		     old_row_step, old_column_step,
 		     0, copy_r,
 		     0, copy_c);
diff -upr a/speech_tools/base_class/EST_TSimpleVector.cc b/speech_tools/base_class/EST_TSimpleVector.cc
--- a/speech_tools/base_class/EST_TSimpleVector.cc	2009-02-18 13:52:55.000000000 +0100
+++ b/speech_tools/base_class/EST_TSimpleVector.cc	2012-10-27 22:19:07.654623000 +0200
@@ -47,12 +47,12 @@
 
 template<class T> void EST_TSimpleVector<T>::copy(const EST_TSimpleVector<T> &a)
 {
-  if (this->p_column_step==1 && a.p_column_step==1)
-    {
-    resize(a.n(), FALSE);
-    memcpy((void *)(this->p_memory), (const void *)(a.p_memory), this->n() * sizeof(T));
-    }
-else
+//  if (this->p_column_step==1 && a.p_column_step==1)
+//    {
+//    resize(a.n(), FALSE);
+//    memcpy((void *)(this->p_memory), (const void *)(a.p_memory), this->n() * sizeof(T));
+//    }
+//else
   ((EST_TVector<T> *)this)->copy(a);
 }
 
@@ -70,7 +70,7 @@ template<class T> void EST_TSimpleVector
   int old_offset = this->p_offset;
   unsigned int q;
 
-  just_resize(newn, &old_vals);
+  this->just_resize(newn, &old_vals);
 
   if (set && old_vals)
     {
@@ -139,9 +139,9 @@ template<class T> EST_TSimpleVector<T> &
 
 template<class T> void EST_TSimpleVector<T>::zero()
 {
-  if (this->p_column_step==1)
-    memset((void *)(this->p_memory), 0, this->n() * sizeof(T));
-  else
+//  if (this->p_column_step==1)
+//    memset((void *)(this->p_memory), 0, this->n() * sizeof(T));
+//  else
     ((EST_TVector<T> *)this)->fill(*this->def_val);
 }
 
diff -upr a/speech_tools/include/EST_TIterator.h b/speech_tools/include/EST_TIterator.h
--- a/speech_tools/include/EST_TIterator.h	2004-05-04 02:00:16.000000000 +0200
+++ b/speech_tools/include/EST_TIterator.h	2012-10-27 21:37:18.562571000 +0200
@@ -209,7 +209,7 @@ public:
 
   /// Create an iterator ready to run over the given container.
   EST_TStructIterator(const Container &over)
-    { begin(over); }
+    { this->begin(over); }
 
   const Entry *operator ->() const
     {return &this->current();}
@@ -289,7 +289,7 @@ public:
 
   /// Create an iterator ready to run over the given container.
   EST_TRwStructIterator(Container &over)
-    { begin(over); }
+    { this->begin(over); }
 
   Entry *operator ->() const
     {return &this->current();}
diff -upr a/speech_tools/include/EST_TNamedEnum.h speech_tools/include/EST_TNamedEnum.h
--- a/speech_tools/include/EST_TNamedEnum.h	2004-09-30 14:53:36.000000000 +0200
+++ b/speech_tools/include/EST_TNamedEnum.h	2012-10-27 21:41:05.114576000 +0200
@@ -130,7 +130,7 @@ public:
 	{this->initialise((const void *)defs); };
   EST_TNamedEnumI(EST_TValuedEnumDefinition<const char *,const char *,INFO> defs[], ENUM (*conv)(const char *))
 	{this->initialise((const void *)defs, conv); };
-  const char *name(ENUM tok, int n=0) const {return value(tok,n); };
+  const char *name(ENUM tok, int n=0) const {return this->value(tok,n); };
 
 };
 
Anhang herunterladen

Patch, um speech_tools unter 12.10 kompilierbar zu machen

Diese Revision wurde am 24. November 2021 15:40 von ubuntuusers erstellt.