mirror of
https://github.com/oatpp/oatpp.git
synced 2025-02-23 17:40:28 +08:00
minor code cleanup
This commit is contained in:
parent
9539f87a46
commit
0a88c55f19
@ -32,17 +32,12 @@
|
||||
#include <unordered_map>
|
||||
#include <stdexcept>
|
||||
|
||||
#ifndef OATPP_DISABLE_ASSERT
|
||||
|
||||
#define OATPP_ASSERT(EXP) \
|
||||
if(!(EXP)) { \
|
||||
OATPP_LOGE("ASSERT[FAILED]", #EXP); \
|
||||
throw std::runtime_error("ASSERT[FAILED]:" #EXP); \
|
||||
}
|
||||
|
||||
#else
|
||||
#define OATPP_ASSERT(EXP)
|
||||
#endif
|
||||
#define OATPP_ASSERT(EXP) \
|
||||
if(!(EXP)) { \
|
||||
OATPP_LOGE("ASSERT[FAILED]", #EXP); \
|
||||
throw std::runtime_error("ASSERT[FAILED]:" #EXP); \
|
||||
}
|
||||
|
||||
typedef unsigned char v_char8;
|
||||
typedef v_char8 *p_char8;
|
||||
|
@ -87,22 +87,7 @@ void testStdListPerformance(v_int32 iterationsCount){
|
||||
|
||||
bool LinkedListTest::onRun() {
|
||||
|
||||
//for(v_int32 i = 0; i < 10000000; i++){
|
||||
//auto ptr = TestObject::createShared2();
|
||||
//}
|
||||
|
||||
// 398689
|
||||
for(v_int32 i = 0; i < 1000000; i++) {
|
||||
auto s = oatpp::base::String::createShared(1024);
|
||||
}
|
||||
|
||||
oatpp::base::String::SharedWrapper s1 = "Leonid";
|
||||
oatpp::base::String::SharedWrapper s2 = "Stryzhevskyi";
|
||||
oatpp::base::String::SharedWrapper s3 = s1 + " " + s2;
|
||||
OATPP_LOGD("Hello!", "s1='%s', s2='%s'", s1->c_str(), s2->c_str());
|
||||
OATPP_LOGD("Hello!", "s3='%s'", s3->c_str());
|
||||
|
||||
/*
|
||||
v_int32 iterationsCount = 100000;
|
||||
|
||||
{
|
||||
@ -118,7 +103,6 @@ bool LinkedListTest::onRun() {
|
||||
testStdListPerformance(iterationsCount);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
return true;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user