Debug memes
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -4,4 +4,5 @@ x64/Release
|
||||
|
||||
src/external/SDL/
|
||||
build/
|
||||
*.rdbg
|
||||
*.rdbg
|
||||
*.spall
|
||||
@@ -24,9 +24,10 @@ void AddCommonFlags(Array<S8_String> *cmd) {
|
||||
if (Profile == PROFILE_DEBUG) {
|
||||
cmd->add("-DDEBUG_BUILD=1");
|
||||
cmd->add("-DRELEASE_BUILD=0");
|
||||
// cmd->add("-fsanitize=address");
|
||||
// cmd->add("-DUSE_ADDRESS_SANITIZER");
|
||||
// cmd->add("-D_DEBUG /MDd");
|
||||
cmd->add("-fsanitize=address");
|
||||
cmd->add("-DUSE_ADDRESS_SANITIZER");
|
||||
cmd->add("-D_DEBUG");
|
||||
// cmd->add("/MDd");
|
||||
} else {
|
||||
cmd->add("-DDEBUG_BUILD=0");
|
||||
cmd->add("-DRELEASE_BUILD=1");
|
||||
|
||||
@@ -145,6 +145,12 @@ void AdjustCarets(Array<Edit> edits, Array<Caret> *carets, bool kill_selection =
|
||||
carets->data[i].range.max = carets->data[i].range.min;
|
||||
}
|
||||
}
|
||||
|
||||
#if DEBUG_BUILD
|
||||
For(*carets) {
|
||||
Assert(it.range.max >= it.range.min);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
bool KILL_SELECTION = true;
|
||||
|
||||
@@ -111,9 +111,6 @@ void ReplaceTitleBarData(Window *window) {
|
||||
Caret caret = last_view->carets[0];
|
||||
XY xy = PosToXY(*last_buffer, GetFront(caret));
|
||||
|
||||
// @todo: this is still not quite correct, the carets here are not offset by edits
|
||||
// so there will some problems here. I need to think about this in the future, maybe
|
||||
// Command_Replace should return the edits and then you can offset manually!
|
||||
Array<Caret> caret_copy = Copy(GetSystemAllocator(), view->carets);
|
||||
defer {
|
||||
Dealloc(&view->carets);
|
||||
|
||||
Reference in New Issue
Block a user