Skip to content

Commit

Permalink
Fix Issue #484 and clang-formating
Browse files Browse the repository at this point in the history
  • Loading branch information
thelfer committed Jan 25, 2024
1 parent 9e379be commit 70e630f
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 8 deletions.
1 change: 1 addition & 0 deletions docs/web/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ pandoc_html(release-notes-3.4.5 "--toc" "--toc-depth=2" "--number-sections")
pandoc_html(release-notes-4.0 "--toc" "--toc-depth=2" "--number-sections")
pandoc_html(release-notes-4.0.1 "--toc" "--toc-depth=2" "--number-sections")
pandoc_html(release-notes-4.0.2 "--toc" "--toc-depth=2" "--number-sections")
pandoc_html(release-notes-4.0.3 "--toc" "--toc-depth=2" "--number-sections")
pandoc_html(release-notes-4.1 "--toc" "--toc-depth=2" "--number-sections")
pandoc_html(release-notes-4.1.1 "--toc" "--toc-depth=2" "--number-sections")
pandoc_html(release-notes-4.2 "--toc" "--toc-depth=2" "--number-sections")
Expand Down
26 changes: 26 additions & 0 deletions docs/web/release-notes-4.0.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: Release notes of the 4.0.3 version of `TFEL`, `MFront` and `MTest`
author: Thomas Helfer
date: 2022
lang: en-EN
numbersections: true
documentclass: article
from: markdown+tex_math_single_backslash
geometry:
- margin=2cm
papersize: a4
link-citations: true
colorlinks: true
figPrefixTemplate: "$$i$$"
tblPrefixTemplate: "$$i$$"
secPrefixTemplate: "$$i$$"
eqnPrefixTemplate: "($$i$$)"
---

# Issues fixed

## Issue 484: Allow `result_type` for `@StaticVariable`

For more details, see <https://github.com/thelfer/tfel/issues/484>


10 changes: 2 additions & 8 deletions mfront/src/DSLBase.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
*/

#include <cctype>
#include <iterator>
#include <sstream>
#include <iterator>
#include <stdexcept>
#include <algorithm>

Expand Down Expand Up @@ -1256,13 +1256,7 @@ namespace mfront {
void DSLBase::treatStaticVar() {
this->checkNotEndOfFile("DSLBase::treatStaticVar",
"Cannot read type of static variable.");
const auto type = this->current->value;
if (!this->isValidIdentifier(type, false)) {
--(this->current);
this->throwRuntimeError("DSLBase::treatStaticVar",
"type given is not valid.");
}
++(this->current);
const auto type = this->readType();
this->checkNotEndOfFile("DSLBase::treatStaticVar",
"Cannot read variable name.");
const auto sname = this->current->value;
Expand Down

0 comments on commit 70e630f

Please sign in to comment.