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
Changelog: #3
base: main
Are you sure you want to change the base?
Changelog: #3
Conversation
Chuvi-w
commented
Aug 18, 2022
- Add CMake support. (.sln and .vsxproj could be deleted)
- Move DumpSTL.h to include/DumpSTL.h directory to prevent adding other library dirs and files to include scope.
- Replace std::string and std::string_view to std::filesystem::path, when we're talking about path.
- Some more fixes...
1. Add CMake support. (.sln and .vsxproj could be deleted) 2. Move DumpSTL.h to include/DumpSTL.h directory to prevent adding other library dirs and files to include scope. 3. Replace std::string and std::string_view to std::filesystem::path, when we're talking about path. 4. Some more fixes...
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.
пробегал тут мимо, поревьюил 👍
} | ||
void exportBin(std::string&& str) const { | ||
void exportBin(fs::path&& filename) const { |
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.
эта реализация теперь дублирует вариант выше
Co-authored-by: Sergey Vaytsel <sergey.vaytsel@gmail.com>
Co-authored-by: Sergey Vaytsel <sergey.vaytsel@gmail.com>
Co-authored-by: Sergey Vaytsel <sergey.vaytsel@gmail.com>
Дико извиняюсь, принимать предложения по изменениям с телефона на ходу было не лучшей идеей. буду за компьютером - продолжу. |
Co-authored-by: Sergey Vaytsel <sergey.vaytsel@gmail.com>
Co-authored-by: Sergey Vaytsel <sergey.vaytsel@gmail.com>
Co-authored-by: Sergey Vaytsel <sergey.vaytsel@gmail.com>
example/CMakeLists.txt
Outdated
@@ -0,0 +1 @@ | |||
add_subdirectory(example) |
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 newline at end of file
тут и в example/example/CMakeLists.txt
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.
Не вижу в синтаксисе cmake требований ставить newline в конце файла.
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.
вот статейку нашёл на эту тему — https://semakin.dev/2020/05/no_newline_at_end_of_file/
некоторые редакторы можно настроить, чтобы автоматом добавлять перенос в конце файла перед сохранением.
include/DumpSTL/DumpSTL.h
Outdated
enum | ||
{ | ||
header_size_bytes = 80 | ||
}; |
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.
думаю проще static constexpr unsigned header_size_bytes = 80;
со структурой приятнее выглядит, согласен
include/DumpSTL/DumpSTL.h
Outdated
fullFileName << DUMP::folderSTL << fileName << fileNameSeparator << index | ||
<< fileExtension; | ||
fs::path fullFileName; | ||
auto generateFName = [&index, &fileName, &fullFileName]() { |
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.
пробела не хватает :)
auto generateFName = [&index, &fileName, &fullFileName]() { | |
auto generateFName = [&index, &fileName, &fullFileName]() { |
header_size_bytes is static constexpr now. Space added.
constexpr bool isEnable = true; // global turn off/turn on this tool (without clear code) | ||
constexpr std::string_view folderSTL = "C:\\Repos\\STL\\"; // folder, where files will save |
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.
Писал ранее коммент, хз куда пропал, продублирую
Для пользователя каждый раз прописывать полный путь - куда ложить файлы - крайне не удобно
Мы тут поговорили за чаем, и я осознал (мне объяснили) что тут не нужен CMake и всё присущее нормальной open-source библиотеке. DumpSTL изначально задуман как штука, которую используют для быстрой отладки в любом проекте, на vsproj, cmake, на чём угодно работающих. Пользователь не должен добавлять её как зависимость, устанавливать через conan или ещё как. Это именно грубое такое решение для любых проектов, когда надо на коленке проверить что весь твой код обработки модели работает правильно. |