mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Fix clang complaining about control reaching end of non-void function
This commit is contained in:
parent
74b7e53bbb
commit
ce04299f30
10 changed files with 49 additions and 24 deletions
|
|
@ -29,6 +29,7 @@ bool is_fission(int MT);
|
|||
class Function1D {
|
||||
public:
|
||||
virtual double operator()(double x) const = 0;
|
||||
virtual ~Function1D() = default;
|
||||
};
|
||||
|
||||
//==============================================================================
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
#ifndef OPENMC_POSITION_H
|
||||
#define OPENMC_POSITION_H
|
||||
|
||||
#include <cmath>
|
||||
#include <cmath> // for sqrt
|
||||
#include <stdexcept> // for out_of_range
|
||||
#include <vector>
|
||||
|
||||
namespace openmc {
|
||||
|
|
@ -29,6 +30,8 @@ struct Position {
|
|||
case 0: return x;
|
||||
case 1: return y;
|
||||
case 2: return z;
|
||||
default:
|
||||
throw std::out_of_range{"Index in Position must be between 0 and 2."};
|
||||
}
|
||||
}
|
||||
double& operator[](int i) {
|
||||
|
|
@ -36,6 +39,8 @@ struct Position {
|
|||
case 0: return x;
|
||||
case 1: return y;
|
||||
case 2: return z;
|
||||
default:
|
||||
throw std::out_of_range{"Index in Position must be between 0 and 2."};
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue