Skip to content

Commit bd5e7fb

Browse files
authored
Merge pull request #227 from ccagml/new_mvc
146题非Solution类时cpp调试报错
2 parents 0149fb6 + 3fb1d34 commit bd5e7fb

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## version 2.19.9
2+
3+
- 146题非Solution类时cpp调试报错
4+
15
## version 2.19.8
26

37
- 新增尊享100分类

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "vscode-leetcode-problem-rating",
33
"displayName": "LeetCode",
44
"description": "%main.description%",
5-
"version": "2.19.8",
5+
"version": "2.19.9",
66
"author": "ccagml",
77
"publisher": "ccagml",
88
"license": "MIT",

src/dao/debugArgDao.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ class DebugArgDao {
593593
},
594594
146: {
595595
funName: "LRUCache",
596-
paramTypes: ["number"],
596+
paramTypes: [ "string[]","number[][]"],
597597
},
598598
147: {
599599
funName: "insertionSortList",

src/debugex/debugCpp.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,9 @@ class DebugCpp extends DebugBase {
190190
insertCode += `${indent}(new Solution())->${problemType.funName}(arg1, master);\n`;
191191
} else if (templateId === "1095") {
192192
insertCode += `${indent}(new Solution())->${problemType.funName}(arg1, arg0);\n`;
193-
} else {
193+
} else if (templateId === "146") {
194+
insertCode += `LRUCache *lc; for (int i = 0; i < arg0.size(); i++) { if (arg0[i].compare("LRUCache") == 0) { lc = new LRUCache(arg1[i][0]); } else if (arg0[i].compare("put") == 0) { lc->put(arg1[i][0], arg1[i][1]); } else if (arg0[i].compare("get") == 0) { lc->get(arg1[i][0]); } } \n`;
195+
}else {
194196
insertCode += `${indent}(new Solution())->${problemType.funName}(${callArgs.join(", ")});\n`;
195197
}
196198

0 commit comments

Comments
 (0)