diff options
Diffstat (limited to 'sphinx')
-rw-r--r-- | sphinx/domains/c.py | 4 | ||||
-rw-r--r-- | sphinx/domains/cpp.py | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sphinx/domains/c.py b/sphinx/domains/c.py index 164a87254..36a8f1f65 100644 --- a/sphinx/domains/c.py +++ b/sphinx/domains/c.py @@ -432,9 +432,9 @@ class ASTUnaryOpExpr(ASTExpression): def _stringify(self, transform: StringifyTransform) -> str: if self.op[0] in 'cn': - return transform(self.op) + " " + transform(self.expr) + return self.op + " " + transform(self.expr) else: - return transform(self.op) + transform(self.expr) + return self.op + transform(self.expr) def describe_signature(self, signode: TextElement, mode: str, env: "BuildEnvironment", symbol: "Symbol") -> None: diff --git a/sphinx/domains/cpp.py b/sphinx/domains/cpp.py index b801f4030..dca69bace 100644 --- a/sphinx/domains/cpp.py +++ b/sphinx/domains/cpp.py @@ -951,12 +951,12 @@ class ASTFoldExpr(ASTExpression): if self.leftExpr: res.append(transform(self.leftExpr)) res.append(' ') - res.append(transform(self.op)) + res.append(self.op) res.append(' ') res.append('...') if self.rightExpr: res.append(' ') - res.append(transform(self.op)) + res.append(self.op) res.append(' ') res.append(transform(self.rightExpr)) res.append(')') @@ -1223,9 +1223,9 @@ class ASTUnaryOpExpr(ASTExpression): def _stringify(self, transform: StringifyTransform) -> str: if self.op[0] in 'cn': - return transform(self.op) + " " + transform(self.expr) + return self.op + " " + transform(self.expr) else: - return transform(self.op) + transform(self.expr) + return self.op + transform(self.expr) def get_id(self, version: int) -> str: return _id_operator_unary_v2[self.op] + self.expr.get_id(version) |