From 367ed52c738846dfb27f7322f5a59f255f9721a7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=EB=B0=95=EC=A2=85=ED=98=84/=EB=8F=99=EC=9E=91=EC=A0=9C?= =?utf8?q?=EC=96=B4Lab=28SR=29/Staff=20Engineer/=EC=82=BC=EC=84=B1?= =?utf8?q?=EC=A0=84=EC=9E=90?= Date: Wed, 17 Oct 2018 15:50:07 +0900 Subject: [PATCH] [coco] Remove unnecessary indentation (#1889) This commit removes unnecessary indentation which is left to reduce code changes during refactoring. Signed-off-by: Jonghyun Park --- contrib/coco/core/src/IR/Dep.cpp | 12 +++--------- contrib/coco/core/src/IR/Read.cpp | 10 ++-------- 2 files changed, 5 insertions(+), 17 deletions(-) diff --git a/contrib/coco/core/src/IR/Dep.cpp b/contrib/coco/core/src/IR/Dep.cpp index 7f7bfaa..6a5d3ca 100644 --- a/contrib/coco/core/src/IR/Dep.cpp +++ b/contrib/coco/core/src/IR/Dep.cpp @@ -29,11 +29,8 @@ void Dep::bag(Bag *bag) if (_bag != nullptr) { // Remove bag <-> dep link - // TODO Remove unnecessary indentation - { - assert(_bag->deps()->find(this) != _bag->deps()->end()); - _bag->mutable_deps()->erase(this); - } + assert(_bag->deps()->find(this) != _bag->deps()->end()); + _bag->mutable_deps()->erase(this); // Reset _bag _bag = nullptr; @@ -47,10 +44,7 @@ void Dep::bag(Bag *bag) _bag = bag; // Create bag <-> dep link - // TODO Remove unnecessary indentation - { - _bag->mutable_deps()->insert(this); - } + _bag->mutable_deps()->insert(this); } assert(_bag == bag); diff --git a/contrib/coco/core/src/IR/Read.cpp b/contrib/coco/core/src/IR/Read.cpp index 6dff55c..ea01cce 100644 --- a/contrib/coco/core/src/IR/Read.cpp +++ b/contrib/coco/core/src/IR/Read.cpp @@ -31,10 +31,7 @@ void Read::bag(Bag *bag) { if (_bag) { - // TODO Remove unnecessary indentation - { - _bag->mutable_reads()->erase(this); - } + _bag->mutable_reads()->erase(this); _bag = nullptr; } @@ -43,10 +40,7 @@ void Read::bag(Bag *bag) if (bag) { _bag = bag; - // TODO Remove unnecessary indentation - { - _bag->mutable_reads()->insert(this); - } + _bag->mutable_reads()->insert(this); } assert(_bag == bag); -- 2.7.4