Skip to content

Commit 6b13801

Browse files
authored
Update image-smoother.cpp
1 parent 7627e76 commit 6b13801

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

C++/image-smoother.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class Solution {
55
public:
66
vector<vector<int>> imageSmoother(vector<vector<int>>& M) {
7-
const auto m = M.size(), n = M[0].size();
7+
const auto& m = M.size(), &n = M[0].size();
88
vector<vector<int>> result(M);
99
for (int i = 0; i < m; ++i) {
1010
for (int j = 0; j < n; ++j) {
@@ -16,7 +16,7 @@ class Solution {
1616

1717
private:
1818
int getGray(const vector<vector<int>>& M, int i, int j) {
19-
const auto& m = M.size(), n = M[0].size();
19+
const auto& m = M.size(), &n = M[0].size();
2020
double total = 0.0;
2121
int count = 0;
2222
for (int r = -1; r < 2; ++r) {

0 commit comments

Comments
 (0)