Skip to content

Commit

Permalink
fix: replace C++ style headers and functions with C equivalents
Browse files Browse the repository at this point in the history
Signed-off-by: Kaiyao Duan <[email protected]>
  • Loading branch information
inspireMeNow committed Oct 9, 2024
1 parent 69bcf8c commit af11223
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/test_env_detect.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "cpu.h"
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

// Improved version of is_option_disabled function that doesn't modify the original string
bool is_option_disabled(const char* options, const char* option)
Expand All @@ -17,7 +17,7 @@ bool is_option_disabled(const char* options, const char* option)
disabled = true;
break;
}
token = strtok(nullptr, ",");
token = strtok(NULL, ",");
}

free(options_copy);
Expand All @@ -37,7 +37,7 @@ bool check_instruction_disabled(const char* options, const char* option, bool cp

int main()
{
const char* ncnn_isa = std::getenv("NCNN_ISA");
const char* ncnn_isa = getenv("NCNN_ISA");

// Check if NCNN_ISA is set to disable certain options
if (ncnn_isa)
Expand Down

0 comments on commit af11223

Please sign in to comment.