Improved platform detection
This commit is contained in:
parent
42feb48467
commit
a829f705d2
@ -202,7 +202,6 @@ INSTALL (
|
|||||||
|
|
||||||
set(TEST_LIBRARIES
|
set(TEST_LIBRARIES
|
||||||
threadpool::static #Static
|
threadpool::static #Static
|
||||||
TeaSpeak #Static
|
|
||||||
CXXTerminal::static #Static
|
CXXTerminal::static #Static
|
||||||
${StringVariable_LIBRARIES_STATIC}
|
${StringVariable_LIBRARIES_STATIC}
|
||||||
${YAML_CPP_LIBRARIES}
|
${YAML_CPP_LIBRARIES}
|
||||||
|
@ -127,7 +127,9 @@ command command::parse(const std::string_view &data, bool expect_type, bool drop
|
|||||||
}
|
}
|
||||||
|
|
||||||
size_t bulk_index = 0;
|
size_t bulk_index = 0;
|
||||||
while(++current_index > 0 || (current_index == 0 && !expect_type && (expect_type = true))) {
|
while(++current_index > 0 || (current_index == 0 && !expect_type)) {
|
||||||
|
expect_type = true;
|
||||||
|
|
||||||
end_index = data.find_first_of(" |", current_index);
|
end_index = data.find_first_of(" |", current_index);
|
||||||
|
|
||||||
if(end_index != current_index) { /* else we've found another space or a pipe */
|
if(end_index != current_index) { /* else we've found another space or a pipe */
|
||||||
|
@ -50,15 +50,23 @@ void handleCommand(
|
|||||||
const field<tl("key_c"), uint64_t>::optional::bulked& key_c,
|
const field<tl("key_c"), uint64_t>::optional::bulked& key_c,
|
||||||
const trigger<tl("test")>& switch_test
|
const trigger<tl("test")>& switch_test
|
||||||
) {
|
) {
|
||||||
if(key_a.value() < 10)
|
if(key_a.value() < 10) {
|
||||||
cout << "ERROR" << endl;
|
__asm__("nop");
|
||||||
|
}
|
||||||
|
__asm__("nop");
|
||||||
auto b = key_c.as<string>();
|
auto b = key_c.as<string>();
|
||||||
|
__asm__("nop");
|
||||||
string key_c_str = key_c;
|
string key_c_str = key_c;
|
||||||
|
|
||||||
|
__asm__("nop");
|
||||||
auto c = key_b.has_value();
|
auto c = key_b.has_value();
|
||||||
|
|
||||||
cout << key_c[1].value() << endl;
|
__asm__("nop");
|
||||||
cout << "Return code: " << return_code.get_or<string>("XXX") << endl;
|
(void) key_c[1].value();
|
||||||
|
__asm__("nop");
|
||||||
|
(void) return_code.get_or<string>("XXX");
|
||||||
|
//cout << << endl;
|
||||||
|
//cout << "Return code: " << return_code.get_or<string>("XXX") << endl;
|
||||||
__asm__("nop");
|
__asm__("nop");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,7 +93,31 @@ void eval_test(command_result x) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct A {
|
||||||
|
virtual ~A() { puts("~A\n"); }
|
||||||
|
};
|
||||||
|
|
||||||
|
struct B : public A {
|
||||||
|
virtual ~B() { puts("~B\n"); }
|
||||||
|
};
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
make_command_result(error::accounting_slot_limit_reached, "");
|
||||||
|
/*
|
||||||
|
0x559e5259a479 <main()+41>: lea 0xa0(%rsp),%rbx
|
||||||
|
0x559e5259a481 <main()+49>: lea 0x30(%rsp),%r14
|
||||||
|
0x559e5259a486 <main()+54>: callq 0x559e525579d0 <operator new(unsigned long)@plt>
|
||||||
|
0x559e5259a48b <main()+59>: lea 0x17e6a6(%rip),%rdi # 0x559e52718b38
|
||||||
|
0x559e5259a492 <main()+66>: mov %rax,%rbp
|
||||||
|
0x559e5259a495 <main()+69>: callq 0x559e52558b10 <puts@plt>
|
||||||
|
0x559e5259a49a <main()+74>: mov $0x1,%esi
|
||||||
|
0x559e5259a49f <main()+79>: mov %rbp,%rdi
|
||||||
|
0x559e5259a4a2 <main()+82>: callq 0x559e525573d0 <operator delete(void*, unsigned long)@plt>
|
||||||
|
*/
|
||||||
|
{
|
||||||
|
A* var = new B{};
|
||||||
|
delete var;
|
||||||
|
}
|
||||||
test<"abs">();
|
test<"abs">();
|
||||||
//for(const auto& error : avariableErrors)
|
//for(const auto& error : avariableErrors)
|
||||||
// cout << error.name << " = " << hex << "0x" << error.errorId << "," << endl;
|
// cout << error.name << " = " << hex << "0x" << error.errorId << "," << endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user