Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/crawl/crawl
/ cap
Function
cap
crawl-ref/source/format.cc:313–321 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
311
}
312
313
static inline void cap(int &i, int max)
314
{
315
if (i < 0 && -i <= max)
316
i += max;
317
if (i >= max)
318
i = max - 1;
319
if (i < 0)
320
i = 0;
321
}
322
323
char &formatted_string::operator [] (size_t idx)
324
{
Callers
2
tostring
Method · 0.85
display
Method · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected