Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(main): move map_port to network #2115

Merged
merged 3 commits into from
Feb 9, 2024

Conversation

ReenigneArcher
Copy link
Member

@ReenigneArcher ReenigneArcher commented Feb 7, 2024

Description

This PR moves the map_port function out of main, and into network.

Enabler for #1603

Screenshot

Issues Fixed or Closed

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Dependency update (updates to dependencies)
  • Documentation update (changes to documentation)
  • Repository update (changes to repository files, e.g. .github/...)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated the in code docstring/documentation-blocks for new or existing methods/components

Branch Updates

LizardByte requires that branches be up-to-date before merging. This means that after any PR is merged, this branch
must be updated before it can be merged. You must also
Allow edits from maintainers.

  • I want maintainers to keep my branch updated

@ReenigneArcher ReenigneArcher added this to the Implement Unit Testing milestone Feb 7, 2024
@ReenigneArcher ReenigneArcher force-pushed the refactor(main)-move-map_port-to-network branch 2 times, most recently from 69cef9c to d41ece3 Compare February 7, 2024 22:35
Comment on lines 5 to 9
#include "network.h"
#include "config.h"
#include "logging.h"
#include "utility.h"
#include <algorithm>
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not really sure why clang format wants network.h first, but whatever.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe it's treated differently because it's the corresponding .h file for this .cpp file.

Copy link
Member Author

Choose a reason for hiding this comment

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

I was thinking that too but didn't necessarily see the same behavior in other cpp files.

@ReenigneArcher ReenigneArcher force-pushed the refactor(main)-move-map_port-to-network branch from d41ece3 to 959276c Compare February 8, 2024 01:29
@cgutman
Copy link
Collaborator

cgutman commented Feb 8, 2024

This looks fine, but would you mind moving map_port into the net namespace too?

@ReenigneArcher
Copy link
Member Author

@cgutman Done! Also found a map_port function in upnp so renamed that to avoid confusion (and a related function for consistency).

@ReenigneArcher ReenigneArcher force-pushed the refactor(main)-move-map_port-to-network branch from c9108ad to fad1ef4 Compare February 8, 2024 23:04
@ReenigneArcher ReenigneArcher merged commit 1c50bc5 into nightly Feb 9, 2024
44 checks passed
@ReenigneArcher ReenigneArcher deleted the refactor(main)-move-map_port-to-network branch February 9, 2024 14:15
KuleRucket pushed a commit to KuleRucket/Sunshine that referenced this pull request Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants