Skip to content

Roman sukhariev 4 - #47

Open
Zmeyznaet wants to merge 3 commits into
mainfrom
Roman_Sukhariev_4
Open

Roman sukhariev 4#47
Zmeyznaet wants to merge 3 commits into
mainfrom
Roman_Sukhariev_4

Conversation

@Zmeyznaet

Copy link
Copy Markdown
Collaborator

No description provided.

@ghost

ghost commented Nov 26, 2020

Copy link
Copy Markdown

DeepCode's analysis on #f8a72c found:

  • ⚠️ 1 warning 👇

Top issues

Description Example fixes
Unreachable code. Occurrences: 🔧 Example fixes

👉 View analysis in DeepCode’s Dashboard | Configure the bot

Comment thread Roman_Sukhariev_4.1.cpp
int* copy_arr_begin = arr_begin;
int* copy_arr_end = arr_end;
int* mid = arr_begin + ((arr_end - arr_begin) / 2);
return;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Загадочный пустой return посреди функции...

Comment thread Roman_Sukhariev_4.1.cpp
if (tmp == 'm') {
std::cout << "Enter values to fulfill the array (5 numbers)" << '\n';
for (int index = 0; index < kSize; ++index) {
if (!(std::cin >> array[index]) || array[index] == 0) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему нельзя вводить интовый 0?

Comment thread Roman_Sukhariev_4.1.cpp
while (arr_begin != arr_end) {
std::random_device gen;
*(arr_begin) = gen();
*(arr_copy_begin++) = *(arr_begin++);

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Зачем скобки? Инкремент обеих переменных все одно пройдет после выполнения присвоения.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants