MCPcopy Create free account
hub / github.com/assaultcube/AC / correctsel

Function correctsel

source/src/editing.cpp:81–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79COMMAND(edittoggle, "");
80
81bool correctsel(block &s) // ensures above invariant
82{
83 int bsize = ssize - MINBORD;
84 if(s.xs+s.x>bsize) s.xs = bsize-s.x;
85 if(s.ys+s.y>bsize) s.ys = bsize-s.y;
86 if(s.xs<=0 || s.ys<=0) return false;
87 else return !OUTBORD(s.x, s.y);
88}
89
90bool noteditmode(const char* func)
91{

Callers 4

addselectionFunction · 0.85
checkselectionsFunction · 0.85
makeselFunction · 0.85
loopvjFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected