-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lab1 #3
lab1 #3
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Мелкие комментарии необязательные к исправлению.
#include "models/sub_task.hpp" | ||
|
||
namespace Worker { | ||
class LexicographicWordGenerator { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В отдельный файл?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Поправил
size_t wordsPerPart = totalWords / subTask.partCount; | ||
size_t remainingWords = totalWords % subTask.partCount; | ||
|
||
std::cout << "subTask.partNumber: " << subTask.partNumber << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Конструктор должен принимать поток куда писать, чтобы у нас была возможность выбора куда мы пишем
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Сделал
#include <string> | ||
|
||
#include "models/crack_request.hpp" | ||
#include "userver/formats/serialize/to.hpp" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
В большинстве случаев для userver
используете <>
, а тут почему-то ""
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
И порядок include'ов тут отличается от всех остальных файлов
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Поправил
|
||
#include <userver/components/component_list.hpp> | ||
#include <userver/server/handlers/http_handler_json_base.hpp> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Убрал
|
||
#include <userver/components/component_list.hpp> | ||
#include <userver/server/handlers/http_handler_json_base.hpp> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Убрал
#include "models/crack_request.hpp" | ||
|
||
namespace Manager { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Я бы так делал в *.cpp
и читабильность была бы x10:
using HttpHandlerJsonBase = userver::server::handlers::HttpHandlerJsonBase;
using HttpRequest = userver::server::http::HttpRequest;
using HttpStatus = userver::server::http::HttpStatus;
using HttpMethod = userver::server::http::HttpMethod;
using ClientError = userver::server::handlers::ClientError;
using Value = userver::formats::json::Value;
using ValueBuilder = userver::formats::json::ValueBuilder;
using RequestContext = userver::server::request::RequestContext;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Но это необязательно, как вам удобнее.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Думал о таком, но привык, когда using для сокращений полных путей используются по минимуму
|
||
#include <userver/components/component_list.hpp> | ||
#include <userver/server/handlers/http_handler_json_base.hpp> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Поправил
No description provided.