diff --git a/stim/gl/gl_texture.h b/stim/gl/gl_texture.h index b20123c..db3e9b6 100644 --- a/stim/gl/gl_texture.h +++ b/stim/gl/gl_texture.h @@ -47,8 +47,8 @@ class gl_texture : public virtual image_stack //initializes important variables void init() { texID = 0; //initialize texture ID to zero, default if OpenGL returns an error - memset(R, 0, sizeof(size_t)); - memset(S, 0, sizeof(F)); + //memset(R, 0, sizeof(size_t)); + //memset(grid::S, 0, sizeof(F)); } //guesses the color format of the texture @@ -244,14 +244,14 @@ class gl_texture : public virtual image_stack ///@param z size of the voxel in z direction /// Sets the dimenstions of the voxels. void setSpacing(float sx, float sy, float sz){ - S[1] = sx; - S[2] = sy; - S[3] = sz; + grid::S[1] = sx; + grid::S[2] = sy; + grid::S[3] = sz; } ///Returns a stim::vec that contains the x, y, z sizes of the voxel. vec getDims(){ - vec dims(S[1], S[2], S[3]); + vec dims(grid::S[1], grid::S[2], grid::S[3]); return dims; } diff --git a/stim/grids/grid.h b/stim/grids/grid.h index 18aa6cc..0de4def 100644 --- a/stim/grids/grid.h +++ b/stim/grids/grid.h @@ -206,7 +206,7 @@ public: result<<"]"<::S[0] = 1; + grid::S[1] = x; + grid::S[2] = y; + grid::S[3] = z; } ///set dimensions of the grid. diff --git a/stim/parser/filename.h b/stim/parser/filename.h index 0922d67..7baf900 100644 --- a/stim/parser/filename.h +++ b/stim/parser/filename.h @@ -110,11 +110,11 @@ protected: unix_dir = unix_dir.substr(2, unix_dir.length()-2); //extract the directory structure } - if(unix_dir.front() == '/'){ //if there is a leading slash + if(unix_dir[0] == '/'){ //if there is a leading slash relative = false; //the path is not relative unix_dir = unix_dir.substr(1, unix_dir.length() - 1); //remove the slash } - if(unix_dir.back() == '/') + if(unix_dir[unix_dir.size()-1] == '/') unix_dir = unix_dir.substr(0, unix_dir.length() - 1); path = stim::parser::split(unix_dir, '/'); //split up the directory structure -- libgit2 0.21.4