Skip to content

Commit efae9a6

Browse files
committed
C++: do not use fully qualified names in error template parameters
The definition of variables does not use them, so here it is also unnecessary. For C++11 changes this code: ``` m_one_cat = std::unique_ptr<cat_t>(new cat_t(m__io, this, m__root)); m_one_cat->_read(); { // Definition: cat_t* one_cat() { return m_one_cat.get(); } std::unique_ptr<cat_t> _ = one_cat(); if (!(1 == 1)) { throw kaitai::validation_expr_error<std::unique_ptr<debug_array_user_t::cat_t>>(one_cat(), _io(), std::string("/seq/0")); } } ``` to this: ``` m_one_cat = std::unique_ptr<cat_t>(new cat_t(m__io, this, m__root)); m_one_cat->_read(); { // Definition: cat_t* one_cat() { return m_one_cat.get(); } std::unique_ptr<cat_t> _ = one_cat(); if (!(1 == 1)) { throw kaitai::validation_expr_error<std::unique_ptr<cat_t>>(one_cat(), _io(), std::string("/seq/0")); } } ```
1 parent 5671175 commit efae9a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shared/src/main/scala/io/kaitai/struct/languages/CppCompiler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ class CppCompiler(
990990
case UndecidedEndiannessError => "kaitai::undecided_endianness_error"
991991
case ConversionError => "std::invalid_argument"
992992
case validationErr: ValidationError =>
993-
val cppType = kaitaiType2NativeType(validationErr.dt, true)
993+
val cppType = kaitaiType2NativeType(validationErr.dt)
994994
val cppErrName = validationErr match {
995995
case _: ValidationNotEqualError => "validation_not_equal_error"
996996
case _: ValidationLessThanError => "validation_less_than_error"

0 commit comments

Comments
 (0)