SUNET icon indicating copy to clipboard operation
SUNET copied to clipboard

a light strategy server framework.

Results 13 SUNET issues
Sort by recently updated
recently updated
newest added

```c++ static void split(const std::string& str, const std::string& delim, std::vector& ret) { if (str.size()

In C++11, it is recommended to deduce the type when possible by using auto, in some instances it is faster because it avoids type conversion, and it is easier to...

I figured that rather than add to my post in quora, I could just add items as issues as I find them. Feel free to delete the issue if you...

You have your own thread pool implementation which is reinventing the wheel. It also relies on posix threads, which are complicated to use in windows. Consider using OpenMP instead, it...

I found this code: ```c++ int HttpParser::_parse_desc(char* recv_buf, Request& request) { ``` If I am reading the code correctly you never modify the contents of recv_buf, so it should be:...

I found this code: ```c++ int main() { sub_framework::Request* request = new sub_framework::Request(); sub_framework::HttpParser* http_parser = new sub_framework::HttpParser(); char *recv_buf = ""; http_parser->_parse(recv_buf, *request); return 0; } ``` Valgrind would...

This code: ```c++ void HttpParser::encode(const std::string &URL, std::string& result) { ... result = "..."; } ``` would be much more readable and easier to use like this: ```c++ std::string HttpParser::encode(const...

If you want people to review your code, consider adding meaningful commit comments. What is the purpose of your commits? Currently I see several commits with the comment: "Created Readme.md"...

in several places you are using strlen(x.c_str()) This is quite inefficient because strlen has to walk the string which is O(n). Instead, std::string has a length method which is O(1)...

Consider using dependency injection. You have code like this: ```c++ int TextStrategy::_init() { wordseg = WordSeg::_get_instance(); if (NULL == wordseg) { FATAL_LOG("Init Wordseg Error!"); return SUB_FAIL; } std::string crf_model_path =...