Disabled shutdown hook for now, UNICODE support for paths
This commit is contained in:
+1
-1
@@ -131,7 +131,6 @@ struct Hash_Map {
|
|||||||
/* count */
|
/* count */
|
||||||
} else {
|
} else {
|
||||||
/* collision, check resize */
|
/* collision, check resize */
|
||||||
++cell_count;
|
|
||||||
if ((cell_count*1.0f / current_capacity) > 0.666f) {
|
if ((cell_count*1.0f / current_capacity) > 0.666f) {
|
||||||
auto old_data = data;
|
auto old_data = data;
|
||||||
data = (HM_Cell*)calloc(current_capacity*4, sizeof(HM_Cell));
|
data = (HM_Cell*)calloc(current_capacity*4, sizeof(HM_Cell));
|
||||||
@@ -148,6 +147,7 @@ struct Hash_Map {
|
|||||||
free(old_data);
|
free(old_data);
|
||||||
index = hash_val % current_capacity;
|
index = hash_val % current_capacity;
|
||||||
}
|
}
|
||||||
|
++cell_count;
|
||||||
/* search for empty slot for new cell starting at desired index; */
|
/* search for empty slot for new cell starting at desired index; */
|
||||||
/* preventing gotos using lambdas! */
|
/* preventing gotos using lambdas! */
|
||||||
[&]{
|
[&]{
|
||||||
|
|||||||
@@ -75,10 +75,10 @@ struct Hook : Array_List<Lambda<void()>> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct __System_Shutdown_Hook : Hook {
|
// struct __System_Shutdown_Hook : Hook {
|
||||||
void operator()() = delete;
|
// void operator()() = delete;
|
||||||
~__System_Shutdown_Hook() {
|
// ~__System_Shutdown_Hook() {
|
||||||
Hook::operator()();
|
// Hook::operator()();
|
||||||
dealloc();
|
// dealloc();
|
||||||
}
|
// }
|
||||||
} system_shutdown_hook;
|
// } system_shutdown_hook;
|
||||||
|
|||||||
@@ -7,9 +7,9 @@
|
|||||||
Hook h;
|
Hook h;
|
||||||
s32 main(s32 argc, char* argv[]) {
|
s32 main(s32 argc, char* argv[]) {
|
||||||
printf("Hello world");
|
printf("Hello world");
|
||||||
system_shutdown_hook << [] {
|
// system_shutdown_hook << [] {
|
||||||
printf("Goodbye world\n");
|
// printf("Goodbye world\n");
|
||||||
};
|
// };
|
||||||
|
|
||||||
h << []{
|
h << []{
|
||||||
printf("Hallo1");
|
printf("Hallo1");
|
||||||
|
|||||||
Reference in New Issue
Block a user