Skip to content

Commit 8101d34

Browse files
committed
Merge branch 'master' into gui_B
2 parents c1ebeb0 + 86b0b05 commit 8101d34

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

src/Core/IEPlugin/IgbFileToMatrix_Plugin.cc

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ MatrixHandle SCIRun::IgbFileMatrix_reader(LoggerHandle pr, const char *filename)
9090
sz=line.size();
9191

9292

93-
9493
for(int p=0;p<sz;p++)
9594
{
9695

@@ -99,16 +98,12 @@ MatrixHandle SCIRun::IgbFileMatrix_reader(LoggerHandle pr, const char *filename)
9998
if (boost::iequals(strs[p], "x"))
10099
{
101100
x_size=atoi(strs[p+1].c_str());
102-
103-
104101
count += 1;
105102

106103
}
107104
if (boost::iequals(strs[p], "t"))
108105
{
109106
t_size=atoi(strs[p+1].c_str());
110-
111-
112107
count +=1;
113108

114109
}
@@ -139,13 +134,13 @@ MatrixHandle SCIRun::IgbFileMatrix_reader(LoggerHandle pr, const char *filename)
139134
is.seekg (0, ios::end);
140135
length = is.tellg();
141136
is.seekg (1024, ios::beg);
137+
t_size=t_size;
138+
length=length-1024;
142139

143140
vector<float> vec;
144-
vec.resize(x_size*t_size);
141+
vec.resize(length);
142+
is.read ((char*)&vec[0],length);
145143

146-
147-
148-
is.read ((char*)&vec[0],x_size * t_size * sizeof(float));
149144
if (!is)
150145
{
151146
numbyts=is.gcount();
@@ -155,11 +150,9 @@ MatrixHandle SCIRun::IgbFileMatrix_reader(LoggerHandle pr, const char *filename)
155150
is.close();
156151

157152

158-
// auto result(boost::make_shared<DenseMatrix>(x_size,t_size));
153+
auto result(boost::make_shared<DenseMatrix>(x_size,t_size));
159154

160-
DenseMatrixHandle result;
161-
162-
result.reset(new DenseMatrix(x_size,t_size));
155+
163156

164157
for(size_t p=0;p<t_size;p++ )
165158
{

src/Interface/Modules/Render/ES/SRInterface.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,8 +1841,8 @@ namespace SCIRun {
18411841
GLsizei(w), GLsizei(h), 0,
18421842
GL_RGBA,
18431843
GL_UNSIGNED_BYTE, (GLvoid*)font));
1844-
delete font_data;
1845-
delete font;
1844+
delete [] font_data;
1845+
delete [] font;
18461846
}
18471847
}
18481848
} // namespace Render

0 commit comments

Comments
 (0)