/* Unknown monsters first */
if ((ap_r_ptr1->r_tkills == 0) != (ap_r_ptr2->r_tkills == 0))
- return (ap_r_ptr1->r_tkills == 0);
+ return ap_r_ptr1->r_tkills == 0;
/* Higher level monsters first (if known) */
if (ap_r_ptr1->r_tkills && ap_r_ptr2->r_tkills && ap_r_ptr1->level != ap_r_ptr2->level)
len = max - 1;
tmp[len] = '\0';
strcpy(buf, tmp);
- return (len);
+ return len;
}
/*
va_end(vp);
/* Return the number of bytes written */
- return (len);
+ return len;
}
/*
va_end(vp);
/* Return the number of bytes written */
- return (len);
+ return len;
}
/*
va_end(vp);
/* Return the result */
- return (res);
+ return res;
}
/*
*/
int16_t maxroll(DICE_NUMBER num, DICE_SID sides)
{
- return (num * sides);
+ return num * sides;
}
/*
}
/* Return */
- return (tmp);
+ return tmp;
}
/*
return -1;
/* Call the hook */
- return ((*Term->user_hook)(n));
+ return (*Term->user_hook)(n);
}
/*
return -1;
/* Call the hook */
- return ((*Term->xtra_hook)(n, v));
+ return (*Term->xtra_hook)(n, v);
}
/*** Fake hooks ***/
/* Move first */
if ((res = term_gotoxy(x, y)) != 0)
- return (res);
+ return res;
/* Then add the char */
if ((res = term_addch(a, c)) != 0)
- return (res);
+ return res;
return 0;
}
/* Move first */
if ((res = term_gotoxy(x, y)) != 0)
- return (res);
+ return res;
/* Then add the string */
if ((res = term_addstr(n, a, s)) != 0)
- return (res);
+ return res;
return 0;
}
for (int i = 0; i < n && s[i] != 0; i++) {
/* Move first */
if ((res = term_gotoxy(x, y0)) != 0)
- return (res);
+ return res;
if (iskanji(s[i])) {
if ((res = term_addstr(2, a, &s[i])) != 0)
- return (res);
+ return res;
i++;
y0++;
if (s[i] == 0)
break;
} else {
if ((res = term_addstr(1, a, &s[i])) != 0)
- return (res);
+ return res;
y0++;
}
}
}
if (damage > 45) {
- return (6 + max);
+ return 6 + max;
}
if (damage > 33) {
- return (5 + max);
+ return 5 + max;
}
if (damage > 25) {
- return (4 + max);
+ return 4 + max;
}
if (damage > 18) {
- return (3 + max);
+ return 3 + max;
}
if (damage > 11) {
- return (2 + max);
+ return 2 + max;
}
- return (1 + max);
+ return 1 + max;
}
{
if (path_temp(buf, max))
return nullptr;
- return (angband_fopen(buf, "w"));
+ return angband_fopen(buf, "w");
}
#endif /* HAVE_MKSTEMP */
if (path_parse(buf, 1024, file))
return -1;
- return (open(buf, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, mode));
+ return open(buf, O_CREAT | O_EXCL | O_WRONLY | O_BINARY, mode);
}
/*
if (path_parse(buf, 1024, file))
return -1;
- return (open(buf, flags | O_BINARY, 0));
+ return open(buf, flags | O_BINARY, 0);
}
/*
q = quark__str[i].data();
/* Return the quark */
- return (q);
+ return q;
}
POSITION db = ((kx > ky) ? (kx + kx + ky) : (ky + ky + kx));
/* Compare the distances */
- return (da <= db);
+ return da <= db;
}
/*
}
/* Compare indexes */
- return (w1 <= w2);
+ return w1 <= w2;
}
/*
}
/* Compare indexes */
- return (w1 <= w2);
+ return w1 <= w2;
}
/*!
*/
static char octify(uint i)
{
- return (hexsym[i % 8]);
+ return hexsym[i % 8];
}
/*
*/
static char hexify(uint i)
{
- return (hexsym[i % 16]);
+ return hexsym[i % 16];
}
/*
static int deoct(char c)
{
if (isdigit(c))
- return (D2I(c));
+ return D2I(c);
return 0;
}
static int dehex(char c)
{
if (isdigit(c))
- return (D2I(c));
+ return D2I(c);
if (islower(c))
- return (A2I(c) + 10);
+ return A2I(c) + 10;
if (isupper(c))
- return (A2I(tolower(c)) + 10);
+ return A2I(tolower(c)) + 10;
return 0;
}
static char force_upper(char a)
{
- return (islower(a)) ? toupper(a) : a;
+ return islower(a) ? toupper(a) : a;
}
static int angband_stricmp(concptr a, concptr b)
{
size_t dlen = strlen(buf);
if (dlen < bufsize - 1) {
- return (dlen + angband_strcpy(buf + dlen, src, bufsize - dlen));
+ return dlen + angband_strcpy(buf + dlen, src, bufsize - dlen);
} else {
- return (dlen + strlen(src));
+ return dlen + strlen(src);
}
}
swap(&elements[center], &elements[right]);
swap(&elements[center], &elements[right - 1]);
- return (elements[right - 1]);
+ return elements[right - 1];
}
/*
n++;
}
- return (n != 8);
+ return n != 8;
}
/*!
concptr message_str(int age)
{
if ((age < 0) || (age >= message_num()))
- return ("");
+ return "";
return message_history[age]->c_str();
}
if (num_more < angband_term[i]->hgt)
return false;
- return (num_more >= 0);
+ return num_more >= 0;
}
- return (num_more >= 0);
+ return num_more >= 0;
}
/*
return slot;
if ((o_ptr->tval == ItemKindType::SHOT) || (o_ptr->tval == ItemKindType::ARROW) || (o_ptr->tval == ItemKindType::BOLT))
- return (INVEN_AMMO);
+ return INVEN_AMMO;
return -1;
}