Update DN from seasight

This commit is contained in:
2025-11-04 23:31:58 +11:00
parent ed483537c6
commit a17925904d
10 changed files with 3885 additions and 4101 deletions
+1 -1
View File
@@ -394,7 +394,7 @@ DN_API DN_ProfilerZone DN_Profiler_BeginZone(DN_Profiler *profiler, DN_Str8 name
// TODO: We need per-thread-local-storage profiler so that we can use these apis
// across threads. For now, we let them overwrite each other but this is not tenable.
#if 0
if (DN_Str8HasData(anchor->name) && anchor->name != name)
if (anchor->name.size && anchor->name != name)
DN_AssertF(name == anchor->name, "Potentially overwriting a zone by accident? Anchor is '%.*s', name is '%.*s'", DN_Str8PrintFmt(anchor->name), DN_Str8PrintFmt(name));
#endif
+3 -3
View File
@@ -602,7 +602,7 @@ void DN_Docs_Demo()
DN_ProfilerAnchor *read_anchors = DN_Profiler_ReadBuffer();
for (DN_USize index = 0; index < DN_PROFILER_ANCHOR_BUFFER_SIZE; index++) {
DN_ProfilerAnchor *anchor = read_anchors + index;
if (DN_Str8HasData(anchor->name)) {
if (anchor->name.size) {
// ...
}
}
@@ -614,7 +614,7 @@ void DN_Docs_Demo()
DN_ProfilerAnchor *write_anchors = DN_Profiler_WriteBuffer();
for (DN_USize index = 0; index < DN_PROFILER_ANCHOR_BUFFER_SIZE; index++) {
DN_ProfilerAnchor *anchor = write_anchors + index;
if (DN_Str8HasData(anchor->name)) {
if (anchor->name.size) {
// ...
}
}
@@ -1039,7 +1039,7 @@ void DN_Docs_Demo()
// NOTE: DN_Str8x32FromFmt
{
DN_Str8x32 string = DN_Str8x32FromFmt("%" PRIu64, 123123);
DN_Str8x32 string = DN_Str8x32FromFmt("%d", 123123);
if (0) // Prints "123123"
printf("%.*s", DN_Str8PrintFmt(string));
}