Skip to content

Commit

Permalink
move ip_address into rsutils::type namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
maloel committed Jul 7, 2024
1 parent 03a8fc6 commit 87f20ab
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions third-party/realdds/include/realdds/dds-option.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#pragma once

#include <rsutils/json.h>
#include <rsutils/string/ip-address.h>
#include <rsutils/type/ip-address.h>

#include <string>
#include <vector>
Expand Down Expand Up @@ -194,7 +194,7 @@ class dds_ip_option : public dds_string_option
using super = dds_string_option;

public:
using ip_address = rsutils::string::ip_address;
using ip_address = rsutils::type::ip_address;

char const * value_type() const override { return "ip-address"; }

Expand Down
2 changes: 1 addition & 1 deletion third-party/realdds/src/dds-option.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -585,7 +585,7 @@ json dds_enum_option::to_json() const
}


/*static*/ rsutils::string::ip_address dds_ip_option::check_ip( json const & value )
/*static*/ dds_ip_option::ip_address dds_ip_option::check_ip( json const & value )
{
ip_address ip( value.string_ref() );
if( ip.is_valid() )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@


namespace rsutils {
namespace string {
namespace type {


// An IP address, version 4.
Expand Down Expand Up @@ -73,5 +73,5 @@ void from_json( rsutils::json const &, ip_address & );
// See https://github.com/nlohmann/json#arbitrary-types-conversions


} // namespace string
} // namespace type
} // namespace rsutils
6 changes: 3 additions & 3 deletions third-party/rsutils/src/ip-address.cpp
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
// License: Apache 2.0. See LICENSE file in root directory.
// Copyright(c) 2024 Intel Corporation. All Rights Reserved.

#include <rsutils/string/ip-address.h>
#include <rsutils/type/ip-address.h>
#include <rsutils/string/from.h>

#include <rsutils/json.h>
using rsutils::json;


namespace rsutils {
namespace string {
namespace type {


static bool parse_ip_part( char const *& pch, uint8_t & out_byte ) noexcept
Expand Down Expand Up @@ -97,5 +97,5 @@ void from_json( json const & j, ip_address & ip )
}


} // namespace string
} // namespace type
} // namespace rsutils

0 comments on commit 87f20ab

Please sign in to comment.