mirror of
https://github.com/MetaCubeX/subconverter.git
synced 2025-11-04 18:19:42 +08:00
Fix compile error on some platform
Update build script.
This commit is contained in:
parent
24ef7f9e9e
commit
8ed0a620fd
@ -8,11 +8,11 @@ apk add openssl-dev openssl-libs-static curl curl-dev curl-static nghttp2-static
|
|||||||
git clone https://github.com/jbeder/yaml-cpp
|
git clone https://github.com/jbeder/yaml-cpp
|
||||||
cd yaml-cpp
|
cd yaml-cpp
|
||||||
cmake -DYAML_CPP_BUILD_TESTS=OFF -DYAML_CPP_BUILD_TOOLS=OFF . > /dev/null
|
cmake -DYAML_CPP_BUILD_TESTS=OFF -DYAML_CPP_BUILD_TOOLS=OFF . > /dev/null
|
||||||
make install -j4 > /dev/null
|
make install -j2 > /dev/null
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
cmake .
|
cmake .
|
||||||
make -j4
|
make -j2
|
||||||
g++ -o base/subconverter CMakeFiles/subconverter.dir/src/*.o -static -lpcre2-8 -levent -lyaml-cpp -lcurl -lnghttp2 -lssl -lcrypto -lz -lbz2 -ldl -lpthread -O3 -s
|
g++ -o base/subconverter CMakeFiles/subconverter.dir/src/*.o -static -lpcre2-8 -levent -lyaml-cpp -lcurl -lnghttp2 -lssl -lcrypto -lz -lbz2 -ldl -lpthread -O3 -s
|
||||||
|
|
||||||
cd base
|
cd base
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <numeric>
|
#include <numeric>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <climits>
|
||||||
#include <rapidjson/writer.h>
|
#include <rapidjson/writer.h>
|
||||||
#include <rapidjson/document.h>
|
#include <rapidjson/document.h>
|
||||||
#include <yaml-cpp/yaml.h>
|
#include <yaml-cpp/yaml.h>
|
||||||
@ -249,7 +250,7 @@ bool matchRange(std::string &range, int target)
|
|||||||
string_array vArray = split(range, ",");
|
string_array vArray = split(range, ",");
|
||||||
bool match = false;
|
bool match = false;
|
||||||
int range_begin = 0, range_end = 0;
|
int range_begin = 0, range_end = 0;
|
||||||
const std::string reg_num = "\\d+", reg_range = "(\\d+)-(\\d+)", reg_not = "\\!(\\d+)", reg_not_range = "\\!(\\d+)-(\\d+)", reg_less = "(\\d+)-", reg_more = "(\\d+)\+";
|
const std::string reg_num = "\\d+", reg_range = "(\\d+)-(\\d+)", reg_not = "\\!(\\d+)", reg_not_range = "\\!(\\d+)-(\\d+)", reg_less = "(\\d+)-", reg_more = "(\\d+)\\+";
|
||||||
for(std::string &x : vArray)
|
for(std::string &x : vArray)
|
||||||
{
|
{
|
||||||
if(regMatch(x, reg_num))
|
if(regMatch(x, reg_num))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user