~ubuntu-branches/ubuntu/vivid/speech-tools/vivid-proposed

« back to all changes in this revision

Viewing changes to base_class/EST_TSimpleVector.cc

  • Committer: Package Import Robot
  • Author(s): Samuel Thibault, Samuel Thibault, Peter Drysdale
  • Date: 2012-03-26 00:05:28 UTC
  • Revision ID: package-import@ubuntu.com-20120326000528-mw6ekt33at7rdef4
Tags: 1:2.1~release-4
[ Samuel Thibault ]
* control:
  - Bump Standards-Version to 3.9.3 (no changes).
  - Set libestools2.1 multi-arch: same.
* rules: Install libraries to multi-arch path.

[ Peter Drysdale ]
* Add Pre-Depend on multiarch-support as flagged by lintian
* Add qualification to unqualified method calls in templates
  allowing compiling with gcc>=4.7.
* Remove old compiler switch fno-shared-data which is not present
  after gcc>=4.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
#include "EST_TSimpleVector.h"
44
44
#include "EST_matrix_support.h"
45
45
#include <fstream>
 
46
#include <cstring>
46
47
#include "EST_cutils.h"
47
48
 
48
49
template<class T> void EST_TSimpleVector<T>::copy(const EST_TSimpleVector<T> &a)
50
51
  if (this->p_column_step==1 && a.p_column_step==1)
51
52
    {
52
53
    resize(a.n(), FALSE);
53
 
    memcpy((void *)(this->p_memory), (const void *)(a.p_memory), this->n() * sizeof(T));
 
54
    std::memcpy((void *)(this->p_memory), (const void *)(a.p_memory), this->n() * sizeof(T));
54
55
    }
55
56
else
56
57
  ((EST_TVector<T> *)this)->copy(a);
70
71
  int old_offset = this->p_offset;
71
72
  unsigned int q;
72
73
 
73
 
  just_resize(newn, &old_vals);
 
74
  this->just_resize(newn, &old_vals);
74
75
 
75
76
  if (set && old_vals)
76
77
    {
140
141
template<class T> void EST_TSimpleVector<T>::zero()
141
142
{
142
143
  if (this->p_column_step==1)
143
 
    memset((void *)(this->p_memory), 0, this->n() * sizeof(T));
 
144
    std::memset((void *)(this->p_memory), 0, this->n() * sizeof(T));
144
145
  else
145
146
    ((EST_TVector<T> *)this)->fill(*this->def_val);
146
147
}