Skip to content

Roman sukhariev 4#47

Open
Zmeyznaet wants to merge 3 commits intomainfrom
Roman_Sukhariev_4
Open

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

Conversation

@Zmeyznaet
Copy link
Collaborator

No description provided.

@ghost
Copy link

ghost commented Nov 26, 2020

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

int* copy_arr_begin = arr_begin;
int* copy_arr_end = arr_end;
int* mid = arr_begin + ((arr_end - arr_begin) / 2);
return;
Copy link
Collaborator

Choose a reason for hiding this comment

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

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

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
Collaborator

Choose a reason for hiding this comment

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

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

while (arr_begin != arr_end) {
std::random_device gen;
*(arr_begin) = gen();
*(arr_copy_begin++) = *(arr_begin++);
Copy link
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