Skip to content

Commit

Permalink
Address some compilation errors
Browse files Browse the repository at this point in the history
  • Loading branch information
JarrettSJohnson committed May 11, 2024
1 parent 0b925f7 commit 195f4d1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion layer1/CGO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void AssignNewPickColor(CGO* cgo, PickColorManager* pickmgr,
pickmgr->colorNext(color, context, index, bond);
}

int CGO_sz[] = {
std::size_t CGO_sz[] = {
CGO_NULL_SZ,
CGO_NULL_SZ,
CGO_BEGIN_SZ,
Expand Down
3 changes: 2 additions & 1 deletion layer1/CGO.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ Z* -------------------------------------------------------------------
#include <set>
#include <glm/vec3.hpp>
#include <glm/vec4.hpp>
#include <cstdint>

/* Compiled Graphics Library for simple graphics objects
in floating point three-space, with the goal of achieving
Expand Down Expand Up @@ -272,7 +273,7 @@ inline uchar CLIP_NORMAL_VALUE(float cv){ return ((cv>1.f) ? 127 :
#define CGO_ACCESSIBILITY_ARRAY 0x10
#define CGO_TEX_COORD_ARRAY 0x20

extern int CGO_sz[];
extern std::size_t CGO_sz[];
size_t CGO_sz_size();

// I think CGO rendering functions should not modify CGO's, so the
Expand Down
8 changes: 4 additions & 4 deletions layer2/RepCartoon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ static void do_ring(PyMOLGlobals * G, nuc_acid_data *ndata, int n_atom,
color2 = ColorGet(G, g2_ai->color);
}
CGOPickColor(cgo, g1, g1_ai->masked ? cPickableNoPick : cPickableAtom);
Pickable pickcolor2 = { g2, g2_ai->masked ? cPickableNoPick : cPickableAtom };
Pickable pickcolor2 = { static_cast<unsigned int>(g2), g2_ai->masked ? cPickableNoPick : cPickableAtom };
float axis[3];
subtract3f(g2p, g1p, axis);
CGOColorv(cgo, color1);
Expand Down Expand Up @@ -1046,7 +1046,7 @@ static void do_ring(PyMOLGlobals * G, nuc_acid_data *ndata, int n_atom,
color2 = ColorGet(G, bas_ai->color);
}
CGOPickColor(cgo, sugar_at, sug_ai->masked ? cPickableNoPick : cPickableAtom);
Pickable pickcolor2 = { base_at, bas_ai->masked ? cPickableNoPick : cPickableAtom };
Pickable pickcolor2 = { static_cast<unsigned int>(base_at), bas_ai->masked ? cPickableNoPick : cPickableAtom };
float axis[3];
subtract3f(cs->coordPtr(bas), cs->coordPtr(sug), axis);
CGOColorv(cgo, color1);
Expand Down Expand Up @@ -1103,7 +1103,7 @@ static void do_ring(PyMOLGlobals * G, nuc_acid_data *ndata, int n_atom,
}

CGOPickColor(cgo, sugar_at, sug_ai->masked ? cPickableNoPick : cPickableAtom);
Pickable pickcolor2 = { base_at, bas_ai->masked ? cPickableNoPick : cPickableAtom };
Pickable pickcolor2 = { static_cast<unsigned int>(base_at), bas_ai->masked ? cPickableNoPick : cPickableAtom };
float axis[3];
subtract3f(cs->coordPtr(bas), v_outer, axis);
CGOColorv(cgo, color1);
Expand Down Expand Up @@ -1347,7 +1347,7 @@ static void do_ring(PyMOLGlobals * G, nuc_acid_data *ndata, int n_atom,
color1 = color2 = color;
}
CGOPickColor(cgo, atix[i], ai_i[i]->masked ? cPickableNoPick : cPickableAtom);
Pickable pickcolor2 = { atix[ii], ai_i[ii]->masked ? cPickableNoPick : cPickableAtom };
Pickable pickcolor2 = { static_cast<unsigned int>(atix[ii]), ai_i[ii]->masked ? cPickableNoPick : cPickableAtom };
float axis[3];
subtract3f(v_i[ii], v_i[i], axis);
CGOColorv(cgo, color1);
Expand Down

0 comments on commit 195f4d1

Please sign in to comment.