Conversation
aseprite-bot
left a comment
There was a problem hiding this comment.
clang-tidy made some suggestions
| break; | ||
|
|
||
| Cmd* cmd = nullptr; | ||
| switch (t) { |
There was a problem hiding this comment.
warning: switching on non-enum value without default case may not cover all cases [bugprone-switch-missing-default-case]
switch (t) {
^| void TextDecCmdSerial::cmdtype(cmdtype_t& t) | ||
| { | ||
| auto tok = nextToken(); | ||
| t = make_cmdtype(tok.size() > 0 ? tok[0] : ' ', |
There was a problem hiding this comment.
warning: the 'empty' method should be used to check for emptiness instead of 'size' [readability-container-size-empty]
| t = make_cmdtype(tok.size() > 0 ? tok[0] : ' ', | |
| t = make_cmdtype(!tok.empty() ? tok[0] : ' ', |
Additional context
/usr/include/c++/15/bits/basic_string.h:1330: method 'basic_string'::empty() defined here
empty() const _GLIBCXX_NOEXCEPT
^|
|
||
| class CmdSerial : public doc::SubObjectsIO { | ||
| public: | ||
| enum Coding { Decoding = 0, Encoding = 1 }; |
There was a problem hiding this comment.
warning: enum 'Coding' uses a larger base type ('unsigned int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]
enum Coding { Decoding = 0, Encoding = 1 };
^| doc::CelDataRef getCelDataRef(doc::ObjectId celdataId) override; | ||
|
|
||
| protected: | ||
| doc::Sprite* m_sprite = nullptr; |
There was a problem hiding this comment.
warning: member variable 'm_sprite' has protected visibility [misc-non-private-member-variables-in-classes]
doc::Sprite* m_sprite = nullptr;
^|
|
||
| protected: | ||
| doc::Sprite* m_sprite = nullptr; | ||
| dio::FileInterface* m_f = nullptr; |
There was a problem hiding this comment.
warning: member variable 'm_f' has protected visibility [misc-non-private-member-variables-in-classes]
dio::FileInterface* m_f = nullptr;
^| } | ||
|
|
||
| template<> | ||
| inline void write_object(std::ostream& os, Cel* cel) |
There was a problem hiding this comment.
warning: function template specialization 'doc::write_object<doc::Cel *>' has a primary template declaration with different parameter names [readability-inconsistent-declaration-parameter-name]
inline void write_object(std::ostream& os, Cel* cel)
^Additional context
src/doc/object_io.h:18: the primary template declaration seen here
void write_object(std::ostream& os, T obj)
^src/doc/object_io.h:30: differing parameters are named here: ('cel'), in primary template declaration: ('obj')
inline void write_object(std::ostream& os, Cel* cel)
^| } | ||
|
|
||
| template<> | ||
| inline void write_object(std::ostream& os, Layer* layer) |
There was a problem hiding this comment.
warning: function template specialization 'doc::write_object<doc::Layer *>' has a primary template declaration with different parameter names [readability-inconsistent-declaration-parameter-name]
inline void write_object(std::ostream& os, Layer* layer)
^Additional context
src/doc/object_io.h:18: the primary template declaration seen here
void write_object(std::ostream& os, T obj)
^src/doc/object_io.h:42: differing parameters are named here: ('layer'), in primary template declaration: ('obj')
inline void write_object(std::ostream& os, Layer* layer)
^| } | ||
|
|
||
| template<> | ||
| inline void write_object(std::ostream& os, ImageRef image) |
There was a problem hiding this comment.
warning: function template specialization 'doc::write_object<std::shared_ptrdoc::Image>' has a primary template declaration with different parameter names [readability-inconsistent-declaration-parameter-name]
inline void write_object(std::ostream& os, ImageRef image)
^Additional context
src/doc/object_io.h:18: the primary template declaration seen here
void write_object(std::ostream& os, T obj)
^src/doc/object_io.h:48: differing parameters are named here: ('image'), in primary template declaration: ('obj')
inline void write_object(std::ostream& os, ImageRef image)
^| } | ||
|
|
||
| template<> | ||
| inline void write_object(std::ostream& os, ImageRef image) |
There was a problem hiding this comment.
warning: the parameter 'image' is copied for each invocation but only used as a const reference; consider making it a const reference [performance-unnecessary-value-param]
inline void write_object(std::ostream& os, ImageRef image)
^| } | ||
|
|
||
| template<> | ||
| inline ImageRef read_object(std::istream& is, SubObjectsIO* subObjects) |
There was a problem hiding this comment.
warning: parameter 'subObjects' is unused [misc-unused-parameters]
| inline ImageRef read_object(std::istream& is, SubObjectsIO* subObjects) | |
| inline ImageRef read_object(std::istream& is, SubObjectsIO* /*subObjects*/) |
9cf130a to
a649d53
Compare
aseprite-bot
left a comment
There was a problem hiding this comment.
clang-tidy made some suggestions
| doc::Sprite* m_sprite = nullptr; | ||
| dio::FileInterface* m_f = nullptr; | ||
| IdsMap m_idsMap; | ||
| Coding m_coding = Coding::Decoding; |
There was a problem hiding this comment.
warning: member variable 'm_idsMap' has protected visibility [misc-non-private-member-variables-in-classes]
IdsMap m_idsMap;
^
aseprite-bot
left a comment
There was a problem hiding this comment.
clang-tidy made some suggestions
| doc::Sprite* m_sprite = nullptr; | ||
| dio::FileInterface* m_f = nullptr; | ||
| IdsMap m_idsMap; | ||
| Coding m_coding = Coding::Decoding; |
There was a problem hiding this comment.
warning: member variable 'm_coding' has protected visibility [misc-non-private-member-variables-in-classes]
Coding m_coding = Coding::Decoding;
^a649d53 to
57a330a
Compare
aseprite-bot
left a comment
There was a problem hiding this comment.
clang-tidy made some suggestions
| dio::FileInterface* m_f = nullptr; | ||
| IdsMap m_idsMap; | ||
| Coding m_coding = Coding::Decoding; | ||
| bool m_beforeCurState = true; |
There was a problem hiding this comment.
warning: member variable 'm_beforeCurState' has protected visibility [misc-non-private-member-variables-in-classes]
bool m_beforeCurState = true;
^| void operator()(gfx::Point& pt) override; | ||
| void operator()(gfx::Rect& rc) override; | ||
| void operator()(gfx::Region& rg) override; | ||
| void operator()(serial_span& buf) override; |
There was a problem hiding this comment.
warning: function 'app::TextDecCmdSerial::operator()' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
void operator()(serial_span& buf) override;
^Additional context
src/app/cmd_serial.cpp:352: the definition seen here
void TextDecCmdSerial::operator()(serial_span& span)
^src/app/cmd_serial.h:126: differing parameters are named here: ('buf'), in definition: ('span')
void operator()(serial_span& buf) override;
^57a330a to
7e015a4
Compare
7e015a4 to
7bbad9e
Compare
aseprite-bot
left a comment
There was a problem hiding this comment.
clang-tidy made some suggestions
|
|
||
| const doc::Image* m_patch; | ||
| const gfx::Region& m_region; | ||
| const doc::Image* m_patch = nullptr; |
There was a problem hiding this comment.
warning: member variable 'm_patch' has protected visibility [misc-non-private-member-variables-in-classes]
const doc::Image* m_patch = nullptr;
^| const doc::Image* m_patch; | ||
| const gfx::Region& m_region; | ||
| const doc::Image* m_patch = nullptr; | ||
| const gfx::Region* m_region = nullptr; |
There was a problem hiding this comment.
warning: member variable 'm_region' has protected visibility [misc-non-private-member-variables-in-classes]
const gfx::Region* m_region = nullptr;
^| void operator()(gfx::Point& pt) override; | ||
| void operator()(gfx::Rect& rc) override; | ||
| void operator()(gfx::Region& rg) override; | ||
| void operator()(serial_span& buf) override; |
There was a problem hiding this comment.
warning: function 'app::TextDecCmdSerial::operator()' has a definition with different parameter names [readability-inconsistent-declaration-parameter-name]
void operator()(serial_span& buf) override;
^Additional context
src/app/cmd_serial.cpp:367: the definition seen here
void TextDecCmdSerial::operator()(serial_span& span)
^src/app/cmd_serial.h:128: differing parameters are named here: ('buf'), in definition: ('span')
void operator()(serial_span& buf) override;
^7bbad9e to
cfc890c
Compare
Possible fix for: aseprite/aseprite#3220 Found testing: aseprite/aseprite#6022
This is a work-in-progress draft to implement #3718. There is a lot of work to be done yet, a lot of
PRINTARGSfor debugging purposes, etc.The idea behind
.aseprite-undofiles is to create a text format (as it's right now, for debugging purposes), and a binary format (to reduce the size). Then we should be able to embed the binary format in a.asepritechunk in a future.Don't expect compatibility/stability with these
.aseprite-undofiles at the moment (right now there are crashes, a lot).