Skip to content

Commit

Permalink
Merge branch 'master' into dependabot/maven/metadata/metadata-24c09da043
Browse files Browse the repository at this point in the history
  • Loading branch information
mandlil authored Nov 22, 2024
2 parents 5c5ccae + a4ebf2f commit 43e8121
Show file tree
Hide file tree
Showing 7 changed files with 426 additions and 352 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/osv-scanner-unified.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@

# Copyright 2024 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: OSV-Scanner

on:
pull_request:
branches: ["master"]
schedule:
- cron: "12 12 * * 1"
push:
branches: ["master"]

permissions:
# Required to upload SARIF file to CodeQL. See: https://github.com/github/codeql-action/issues/2117
actions: read
# Require writing security events to upload SARIF file to security tab
security-events: write
# Read commit contents
contents: read

jobs:
scan-scheduled:
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }}
# If you want to copy this config, highly suggest pinning this version to a release rather than tracking the main branch
uses: google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@c80d3cb8d7bfabae9f047f6b8ea68792dd2ebcf6 # v1.9.0
scan-pr:
if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }}
# If you want to copy this config, highly suggest pinning this version to a release rather than tracking the main branch
uses: google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@c80d3cb8d7bfabae9f047f6b8ea68792dd2ebcf6 # v1.9.0
473 changes: 246 additions & 227 deletions cpp/src/phonenumbers/phonenumberutil.cc

Large diffs are not rendered by default.

242 changes: 129 additions & 113 deletions cpp/src/phonenumbers/phonenumberutil.h

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions cpp/src/phonenumbers/stringutil.cc
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,6 @@ StringHolder::StringHolder(uint64 n)
: absl::AlphaNum(n)
{}

StringHolder::StringHolder(absl::string_view sv)
: absl::AlphaNum(sv)
{}

StringHolder::~StringHolder() {}

// StrCat
Expand Down Expand Up @@ -297,4 +293,4 @@ void StrAppend(string* dest, const StringHolder& s1, const StringHolder& s2,
}

} // namespace phonenumbers
} // namespace i18n
} // namespace i18n
9 changes: 4 additions & 5 deletions cpp/src/phonenumbers/stringutil.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,9 @@ int GlobalReplaceSubstring(const string& substring, const string& replacement,
class StringHolder: public absl::AlphaNum {
public:
// Don't make the constructors explicit to make the StrCat usage convenient.
StringHolder(const string& s); // NOLINT(runtime/explicit)
StringHolder(const char* s); // NOLINT(runtime/explicit)
StringHolder(uint64_t n); // NOLINT(runtime/explicit)
StringHolder(absl::string_view sv); // NOLINT(runtime/explicit)
StringHolder(const string& s); // NOLINT(runtime/explicit)
StringHolder(const char* s); // NOLINT(runtime/explicit)
StringHolder(uint64_t n); // NOLINT(runtime/explicit)
~StringHolder();

const absl::string_view GetString() const {
Expand Down Expand Up @@ -200,4 +199,4 @@ void StrAppend(string* dest, const StringHolder& s1, const StringHolder& s2,
} // namespace phonenumbers
} // namespace i18n

#endif // I18N_PHONENUMBERS_STRINGUTIL_H_
#endif // I18N_PHONENUMBERS_STRINGUTIL_H_
4 changes: 3 additions & 1 deletion pending_code_changes.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@

Code changes:
- Reverted the std:: qualifier to string throughout phonenumberutil.
- Reverted absl::string_view to std::string parameters.
2 changes: 1 addition & 1 deletion tools/java/cpp-build/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
<dependency>
<groupId>com.google.protobuf</groupId>
<artifactId>protobuf-java</artifactId>
<version>3.24.0</version>
<version>3.25.5</version>
</dependency>
</dependencies>

Expand Down

0 comments on commit 43e8121

Please sign in to comment.