From 8ebfdc3eb78ce68f7441c70f2c649ffe501c8e0e Mon Sep 17 00:00:00 2001 From: Patrick Shriwise Date: Fri, 13 Sep 2019 13:45:18 -0500 Subject: [PATCH] Improving documentation. --- include/openmc/cell.h | 7 +++++++ src/cell.cpp | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/include/openmc/cell.h b/include/openmc/cell.h index 5e53e3bc4..5ba714570 100644 --- a/include/openmc/cell.h +++ b/include/openmc/cell.h @@ -214,15 +214,20 @@ protected: static BoundingBox bounding_box_complex(std::vector rpn); //! Applies DeMorgan's laws to a section of the RPN + //! \param start Starting point for token modification + //! \param stop Stopping point for token modification static void apply_demorgan(std::vector::iterator start, std::vector::iterator stop); //! Removes complement operators from the RPN + //! \param rpn The rpn to remove complement operators from. static void remove_complement_ops(std::vector& rpn); //! Returns the beginning position of a parenthesis block (immediately before //! two surface tokens) in the RPN given a starting position at the end of //! that block (immediately after two surface tokens) + //! \param start Starting position of the search + //! \param rpn The rpn being searched static std::vector::iterator find_left_parenthesis(std::vector::iterator start, const std::vector& rpn); @@ -230,6 +235,8 @@ protected: //! Returns the ending position of a parenthesis block (immediately after two //! operator tokens) in the RPN given a starting position at the beginning of //! that block (immediately before two surface tokens) + //! \param start Starting position of the search + //! \param rpn The rpn being searched static std::vector::iterator find_right_parenthesis(std::vector::iterator start, const std::vector& rpn); diff --git a/src/cell.cpp b/src/cell.cpp index 7beb98cc2..d87af54e4 100644 --- a/src/cell.cpp +++ b/src/cell.cpp @@ -601,7 +601,7 @@ BoundingBox CSGCell::bounding_box_simple() const { void CSGCell::apply_demorgan(std::vector::iterator start, std::vector::iterator stop) { - while(start < stop) { + while (start < stop) { if (*start < OP_UNION) { *start *= -1; } else if (*start == OP_UNION) { *start = OP_INTERSECTION; } else if (*start == OP_INTERSECTION) { *start = OP_UNION; }