diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-06-17 16:34:32 +0200 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-06-17 16:34:32 +0200 |
commit | 9ec260619b48447e398445aecd6651d319b8217e (patch) | |
tree | f3e8dd12c37b61b0215e3e667a33d86e46f2e268 /libraries/classparser | |
parent | 03e454b71d83aebbb534c5734ccd9093842da28c (diff) | |
download | PrismLauncher-9ec260619b48447e398445aecd6651d319b8217e.tar.gz PrismLauncher-9ec260619b48447e398445aecd6651d319b8217e.tar.bz2 PrismLauncher-9ec260619b48447e398445aecd6651d319b8217e.zip |
fix: fix warnings reported by LGTM.com
Diffstat (limited to 'libraries/classparser')
-rw-r--r-- | libraries/classparser/src/annotations.cpp | 4 | ||||
-rw-r--r-- | libraries/classparser/src/classfile.h | 4 | ||||
-rw-r--r-- | libraries/classparser/src/constants.h | 5 |
3 files changed, 7 insertions, 6 deletions
diff --git a/libraries/classparser/src/annotations.cpp b/libraries/classparser/src/annotations.cpp index 18a9e880..89b201bc 100644 --- a/libraries/classparser/src/annotations.cpp +++ b/libraries/classparser/src/annotations.cpp @@ -79,7 +79,7 @@ element_value *element_value::readElementValue(util::membuffer &input, } return new element_value_array(ARRAY, vals, pool); default: - throw new java::classfile_exception(); + throw java::classfile_exception(); } } -}
\ No newline at end of file +} diff --git a/libraries/classparser/src/classfile.h b/libraries/classparser/src/classfile.h index 1616a828..d629dde1 100644 --- a/libraries/classparser/src/classfile.h +++ b/libraries/classparser/src/classfile.h @@ -17,7 +17,7 @@ public: is_synthetic = false; read_be(magic); if (magic != 0xCAFEBABE) - throw new classfile_exception(); + throw classfile_exception(); read_be(minor_version); read_be(major_version); constants.load(*this); @@ -153,4 +153,4 @@ public: // FIXME: doesn't free up memory on delete java::annotation_table visible_class_annotations; }; -}
\ No newline at end of file +} diff --git a/libraries/classparser/src/constants.h b/libraries/classparser/src/constants.h index 3b6c3b7a..47b325b9 100644 --- a/libraries/classparser/src/constants.h +++ b/libraries/classparser/src/constants.h @@ -1,5 +1,6 @@ #pragma once #include "errors.h" +#include "membuffer.h" #include <sstream> namespace java @@ -90,7 +91,7 @@ public: break; default: // invalid constant type! - throw new classfile_exception(); + throw classfile_exception(); } } constant(int) @@ -210,7 +211,7 @@ public: { if (constant_index == 0 || constant_index > constants.size()) { - throw new classfile_exception(); + throw classfile_exception(); } return constants[constant_index - 1]; } |