Add spaces around comparison operators in render/ and ui/ source files.
PiperOrigin-RevId: 536001297 Change-Id: Ia0d97bf9f886aea03b8363e4d97e18301520909f
This commit is contained in:
committed by
Copybara-Service
parent
455b1cd2e2
commit
d1c6561f1c
@@ -864,8 +864,11 @@ void mjr_figure(mjrRect viewport, mjvFigure* fig, const mjrContext* con) {
|
|||||||
|
|
||||||
// find length of selected subplot title (skip non-space or single space)
|
// find length of selected subplot title (skip non-space or single space)
|
||||||
int sublen = 0;
|
int sublen = 0;
|
||||||
while ((subadr+sublen<1000 && fig->title[subadr+sublen] && fig->title[subadr+sublen]!=' ') ||
|
while ((subadr+sublen < 1000 &&
|
||||||
(subadr+sublen+1<1000 && fig->title[subadr+sublen+1] && fig->title[subadr+sublen+1]!=' ')) {
|
fig->title[subadr+sublen] &&
|
||||||
|
fig->title[subadr+sublen] != ' ') ||
|
||||||
|
(subadr+sublen+1 < 1000 && fig->title[subadr+sublen+1] &&
|
||||||
|
fig->title[subadr+sublen+1] != ' ')) {
|
||||||
sublen++;
|
sublen++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -782,7 +782,8 @@ void mjr_render(mjrRect viewport, mjvScene* scn, const mjrContext* con) {
|
|||||||
|
|
||||||
// determine stereo; quadbuffered reverts to sidebyside if hardware not available
|
// determine stereo; quadbuffered reverts to sidebyside if hardware not available
|
||||||
stereo = scn->stereo;
|
stereo = scn->stereo;
|
||||||
if (stereo==mjSTEREO_QUADBUFFERED && (con->currentBuffer!=mjFB_WINDOW || !con->windowStereo)) {
|
if (stereo == mjSTEREO_QUADBUFFERED &&
|
||||||
|
(con->currentBuffer != mjFB_WINDOW || !con->windowStereo)) {
|
||||||
stereo = mjSTEREO_SIDEBYSIDE;
|
stereo = mjSTEREO_SIDEBYSIDE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+11
-6
@@ -1213,7 +1213,9 @@ void mjui_add(mjUI* ui, const mjuiDef* def) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// parse button and check
|
// parse button and check
|
||||||
if (it->type==mjITEM_BUTTON || it->type==mjITEM_CHECKINT || it->type==mjITEM_CHECKBYTE) {
|
if (it->type == mjITEM_BUTTON ||
|
||||||
|
it->type == mjITEM_CHECKINT ||
|
||||||
|
it->type == mjITEM_CHECKBYTE) {
|
||||||
parseshortcut(def[n].other, &(it->single.modifier), &(it->single.shortcut));
|
parseshortcut(def[n].other, &(it->single.modifier), &(it->single.shortcut));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1421,7 +1423,9 @@ void mjui_resize(mjUI* ui, const mjrContext* con) {
|
|||||||
|
|
||||||
// packed pair of items
|
// packed pair of items
|
||||||
if (i < s->nitem-1 && s->item[i+1].type == it->type &&
|
if (i < s->nitem-1 && s->item[i+1].type == it->type &&
|
||||||
(it->type==mjITEM_BUTTON || it->type==mjITEM_CHECKINT || it->type==mjITEM_CHECKBYTE)) {
|
(it->type == mjITEM_BUTTON ||
|
||||||
|
it->type == mjITEM_CHECKINT ||
|
||||||
|
it->type == mjITEM_CHECKBYTE)) {
|
||||||
// get next item pointer
|
// get next item pointer
|
||||||
mjuiItem* it1 = s->item + (i+1);
|
mjuiItem* it1 = s->item + (i+1);
|
||||||
|
|
||||||
@@ -1819,7 +1823,8 @@ void mjui_update(int section, int item, const mjUI* ui,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case mjITEM_CHECKINT:
|
case mjITEM_CHECKINT:
|
||||||
case mjITEM_CHECKBYTE: {
|
case mjITEM_CHECKBYTE:
|
||||||
|
{
|
||||||
if (state) {
|
if (state) {
|
||||||
rgbdecor = ui->color.check;
|
rgbdecor = ui->color.check;
|
||||||
}
|
}
|
||||||
@@ -1880,7 +1885,8 @@ void mjui_update(int section, int item, const mjUI* ui,
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case mjITEM_RADIOLINE: {
|
case mjITEM_RADIOLINE:
|
||||||
|
{
|
||||||
if (state) {
|
if (state) {
|
||||||
rgbdecor = ui->color.radio;
|
rgbdecor = ui->color.radio;
|
||||||
}
|
}
|
||||||
@@ -2597,8 +2603,7 @@ void mjui_render(mjUI* ui, const mjuiState* state, const mjrContext* con) {
|
|||||||
|
|
||||||
// blit to current buffer
|
// blit to current buffer
|
||||||
mjrRect raux = {0, mjMAX(0, ui->height - ui->scroll - rect.height),
|
mjrRect raux = {0, mjMAX(0, ui->height - ui->scroll - rect.height),
|
||||||
ui->width, mjMIN(rect.height, ui->height - ui->scroll)
|
ui->width, mjMIN(rect.height, ui->height - ui->scroll)};
|
||||||
};
|
|
||||||
mjr_blitAux(ui->auxid, raux, rect.left,
|
mjr_blitAux(ui->auxid, raux, rect.left,
|
||||||
rect.bottom + mjMAX(0, rect.height - ui->height + ui->scroll), con);
|
rect.bottom + mjMAX(0, rect.height - ui->height + ui->scroll), con);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user